diff options
author | Derick Rethans <github@derickrethans.nl> | 2006-08-17 14:24:24 +0000 |
---|---|---|
committer | Derick Rethans <github@derickrethans.nl> | 2006-08-17 14:24:24 +0000 |
commit | e981be4dca177e235f6aa9b597d4a99c0a2cf875 (patch) | |
tree | 4446a90e1050e4e1b62c586531192fca56678433 /src/options/chart.php | |
parent | 24758cba490f1670961042c6470ad7579af1f8c1 (diff) | |
download | zetacomponents-graph-e981be4dca177e235f6aa9b597d4a99c0a2cf875.zip zetacomponents-graph-e981be4dca177e235f6aa9b597d4a99c0a2cf875.tar.gz |
- Updated to use new property mechanism.
Diffstat (limited to 'src/options/chart.php')
-rw-r--r-- | src/options/chart.php | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/src/options/chart.php b/src/options/chart.php index edfe012..818a1df 100644 --- a/src/options/chart.php +++ b/src/options/chart.php @@ -10,35 +10,20 @@ /** * Class containing the basic options for charts * + * @property int $width + * Width of the chart. + * @property int $heigh + * Height of the chart. + * @property int $font + * Font used in the graph. + * * @package Graph */ class ezcGraphChartOptions extends ezcBaseOptions { - /** - * Width of the chart - * - * @var int - */ - protected $width; - - /** - * Height of the chart - * - * @var int - * @access protected - */ - protected $height; - - /** - * Font used in the graph - * - * @var int - */ - protected $font; - public function __construct( array $options = array() ) { - $this->font = new ezcGraphFontOptions(); + $this->properties['font'] = new ezcGraphFontOptions(); parent::__construct( $options ); } @@ -50,20 +35,20 @@ class ezcGraphChartOptions extends ezcBaseOptions * @param mixed $propertyValue * @throws ezcBasePropertyNotFoundException * If a property is not defined in this class - * @return void + * @ignore */ public function __set( $propertyName, $propertyValue ) { switch ( $propertyName ) { case 'width': - $this->width = max( 1, (int) $propertyValue ); + $this->properties['width'] = max( 1, (int) $propertyValue ); break; case 'height': - $this->height = max( 1, (int) $propertyValue ); + $this->properties['height'] = max( 1, (int) $propertyValue ); break; case 'font': - $this->font->font = $propertyValue; + $this->properties['font']->font = $propertyValue; break; default: throw new ezcBasePropertyNotFoundException( $propertyName ); |