From 9d8baefbdf52a83adfb2efed5ebe4bd7b7f765a7 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Wed, 20 Sep 2006 15:12:20 +0000 Subject: - Added and improved documentation --- src/axis/date.php | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) (limited to 'src/axis/date.php') diff --git a/src/axis/date.php b/src/axis/date.php index 601119a..7bb8e1c 100644 --- a/src/axis/date.php +++ b/src/axis/date.php @@ -1,6 +1,6 @@ properties['interval'] = $interval; } + /** + * Calculate lower nice date + * + * Calculates a date which is earlier or equal to the given date, and is + * divisible by the given interval. + * + * @param int $min Date + * @param int $interval Interval + * @return int Earlier date + */ protected function calculateLowerNiceDate( $min, $interval ) { $dateSteps = array( 60, 60, 24, 7, 52 ); @@ -225,11 +241,33 @@ class ezcGraphChartElementDateAxis extends ezcGraphChartElementAxis ); } + /** + * Calculate start date + * + * Use calculateLowerNiceDate to get a date earlier or equal date then the + * minimum date to use it as the start date for the axis depending on the + * selected interval. + * + * @param mixed $min Minimum date + * @param mixed $max Maximum date + * @return void + */ public function calculateMinimum( $min, $max ) { $this->properties['startDate'] = $this->calculateLowerNiceDate( $min, $this->interval ); } + /** + * Calculate end date + * + * Use calculateLowerNiceDate to get a date later or equal date then the + * maximum date to use it as the end date for the axis depending on the + * selected interval. + * + * @param mixed $min Minimum date + * @param mixed $max Maximum date + * @return void + */ public function calculateMaximum( $min, $max ) { $this->properties['endDate'] = $this->calculateLowerNiceDate( $max, $this->interval ); @@ -243,8 +281,6 @@ class ezcGraphChartElementDateAxis extends ezcGraphChartElementAxis /** * Calculate axis bounding values on base of the assigned values * - * @abstract - * @access public * @return void */ public function calculateAxisBoundings() -- cgit v1.1