diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-09-21 12:56:01 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-09-21 12:56:01 +0000 |
commit | 1a921c1448b7fb0d205afc20034bd725bf9450c0 (patch) | |
tree | e581df6ff6c12f9ac70a01759c8bfbfcefaacbda /src/structs | |
parent | 9d8baefbdf52a83adfb2efed5ebe4bd7b7f765a7 (diff) | |
download | zetacomponents-graph-1a921c1448b7fb0d205afc20034bd725bf9450c0.zip zetacomponents-graph-1a921c1448b7fb0d205afc20034bd725bf9450c0.tar.gz |
- Added documentation
- Removed no longer used exceptions
Diffstat (limited to 'src/structs')
-rw-r--r-- | src/structs/context.php | 48 | ||||
-rw-r--r-- | src/structs/coordinate.php | 47 |
2 files changed, 91 insertions, 4 deletions
diff --git a/src/structs/context.php b/src/structs/context.php index 351031f..b53f149 100644 --- a/src/structs/context.php +++ b/src/structs/context.php @@ -1,13 +1,40 @@ <?php - +/** + * File containing the ezcGraphContext struct + * + * @package Graph + * @version //autogentag// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ +/** + * Struct to represent the context of a renderer operation + * + * @package Graph + */ class ezcGraphContext { + /** + * Name of dataset + * + * @var string + */ public $dataset = false; + /** + * Name of datapoint + * + * @var string + */ public $datapoint = false; /** - * Empty constructor + * Simple constructor + * + * @param string $dataset Name of dataset + * @param string $datapoint Name of datapoint + * @return void + * @ignore */ public function __construct( $dataset = false, $datapoint = false ) { @@ -17,6 +44,8 @@ class ezcGraphContext /** * Throws a BasePropertyNotFound exception. + * + * @ignore */ public function __set( $name, $value ) { @@ -25,11 +54,26 @@ class ezcGraphContext /** * Throws a BasePropertyNotFound exception. + * + * @ignore */ public function __get( $name ) { throw new ezcBasePropertyNotFoundException( $name ); } + + /** + * __set_state + * + * @param array $properties Struct properties + * @return void + * @ignore + */ + public function __set_state( array $properties ) + { + $this->dataset = (string) $properties['dataset']; + $this->datapoint = (string) $properties['datapoint']; + } } ?> diff --git a/src/structs/coordinate.php b/src/structs/coordinate.php index d7093d4..c84683f 100644 --- a/src/structs/coordinate.php +++ b/src/structs/coordinate.php @@ -1,13 +1,39 @@ <?php - +/** + * File containing the ezcGraphCoordinate struct + * + * @package Graph + * @version //autogentag// + * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ +/** + * Represents coordinates in two dimensional catesian coordinate system. + * + * @package Graph + */ class ezcGraphCoordinate { + /** + * x coordinate + * + * @var float + */ public $x = 0; + /** + * y coordinate + * + * @var float + */ public $y = 0; /** - * Empty constructor + * Simple constructor + * + * @param float $x x coordinate + * @param float $y y coordinate + * @ignore */ public function __construct( $x, $y ) { @@ -17,6 +43,8 @@ class ezcGraphCoordinate /** * Throws a BasePropertyNotFound exception. + * + * @ignore */ public function __set( $name, $value ) { @@ -25,11 +53,26 @@ class ezcGraphCoordinate /** * Throws a BasePropertyNotFound exception. + * + * @ignore */ public function __get( $name ) { throw new ezcBasePropertyNotFoundException( $name ); } + + /** + * __set_state + * + * @param array $properties Struct properties + * @return void + * @ignore + */ + public function __set_state( array $properties ) + { + $this->x = (float) $properties['x']; + $this->y = (float) $properties['y']; + } } ?> |