summaryrefslogtreecommitdiffstats
path: root/src/structs
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-09-21 12:56:01 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-09-21 12:56:01 +0000
commit1a921c1448b7fb0d205afc20034bd725bf9450c0 (patch)
treee581df6ff6c12f9ac70a01759c8bfbfcefaacbda /src/structs
parent9d8baefbdf52a83adfb2efed5ebe4bd7b7f765a7 (diff)
downloadzetacomponents-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.php48
-rw-r--r--src/structs/coordinate.php47
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'];
+ }
}
?>
OpenPOWER on IntegriCloud