[Phphtmllib-devel] SF.net SVN: phphtmllib:[3215] trunk/open2300/lib/external/open-flash-chart2 /php
Status: Beta
Brought to you by:
hemna
From: <he...@us...> - 2009-02-17 15:08:03
|
Revision: 3215 http://phphtmllib.svn.sourceforge.net/phphtmllib/?rev=3215&view=rev Author: hemna Date: 2009-02-17 15:08:01 +0000 (Tue, 17 Feb 2009) Log Message: ----------- some modifications to OFC to eliminate PEAR use. added a few missing classes Modified Paths: -------------- trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/JSON.php trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/OFC_Elements.php Added Paths: ----------- trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Dot_Value.php trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Tooltip.php Added: trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Dot_Value.php =================================================================== --- trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Dot_Value.php (rev 0) +++ trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Dot_Value.php 2009-02-17 15:08:01 UTC (rev 3215) @@ -0,0 +1,48 @@ +<?php + +require_once('OFC/Elements/OFC_Elements_Base.php'); +require_once('OFC/Elements/OFC_Elements_Tooltip.php'); + +class OFC_Elements_Dot_Value extends OFC_Elements_Base { + + /** + * Constructor of the dot value + * + * @param $value + * @param $colour + */ + public function __construct($value) { + parent::__construct(); + + $this->value = $value; + } + + + /** + * Set the color of the value. + * + * @param $colour in hex + */ + public function set_colour( $colour ) { + $this->colour = $colour; + } + + /** + * Set the size of the value. + * + * @param $size in hex + */ + public function set_size( $size ) { + $this->size = $size; + } + + /** + * Set the tooltip. + * + * @param $tooltip + */ + public function set_tooltip( $tip ) { + $this->tip = $tip; + } +} +?> \ No newline at end of file Added: trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Tooltip.php =================================================================== --- trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Tooltip.php (rev 0) +++ trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/Elements/OFC_Elements_Tooltip.php 2009-02-17 15:08:01 UTC (rev 3215) @@ -0,0 +1,54 @@ +<?php + +require_once('OFC/Elements/OFC_Elements_Base.php'); + +class OFC_Elements_Tooltip extends OFC_Elements_Base { + + public function __construct() { + parent::__construct(); + $this->type = 'tooltip'; + } + + public function set_shadow( $shadow ) + { + $this->shadow = $shadow; + } + + // stroke in pixels (e.g. 5 ) + public function set_stroke( $stroke ) + { + $this->stroke = $stroke; + } + + public function set_colour( $colour ) + { + $this->colour = $colour; + } + + public function set_background_colour( $bg ) + { + $this->background = $bg; + } + + // a css style + public function set_title_style( $style ) + { + $this->title = $style; + } + + public function set_body_style( $style ) + { + $this->body = $style; + } + + public function set_proximity() + { + $this->mouse = 1; + } + + public function set_hover() + { + $this->mouse = 2; + } +} +?> \ No newline at end of file Modified: trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/JSON.php =================================================================== --- trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/JSON.php 2009-02-17 15:05:12 UTC (rev 3214) +++ trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/JSON.php 2009-02-17 15:08:01 UTC (rev 3215) @@ -402,7 +402,6 @@ case 'object': $vars = get_object_vars($var); - $properties = array_map(array($this, 'name_value'), array_keys($vars), array_values($vars)); @@ -438,7 +437,6 @@ if(Services_JSON::isError($encoded_value)) { return $encoded_value; } - return $this->encode(strval($name)) . ':' . $encoded_value; } @@ -765,9 +763,7 @@ */ function isError($data, $code = null) { - if (class_exists('pear')) { - return PEAR::isError($data, $code); - } elseif (is_object($data) && (get_class($data) == 'services_json_error' || + if (is_object($data) && (get_class($data) == 'services_json_error' || is_subclass_of($data, 'services_json_error'))) { return true; } @@ -776,19 +772,6 @@ } } -if (class_exists('PEAR_Error')) { - - class Services_JSON_Error extends PEAR_Error - { - function Services_JSON_Error($message = 'unknown error', $code = null, - $mode = null, $options = null, $userinfo = null) - { - parent::PEAR_Error($message, $code, $mode, $options, $userinfo); - } - } - -} else { - /** * @todo Ultimately, this class shall be descended from PEAR_Error */ @@ -800,6 +783,3 @@ } } - -} - Modified: trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/OFC_Elements.php =================================================================== --- trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/OFC_Elements.php 2009-02-17 15:05:12 UTC (rev 3214) +++ trunk/open2300/lib/external/open-flash-chart2/php5-ofc-library/lib/OFC/OFC_Elements.php 2009-02-17 15:08:01 UTC (rev 3215) @@ -29,3 +29,7 @@ require_once('OFC/Elements/Legend/OFC_Elements_Legend_Y.php'); require_once('OFC/Elements/OFC_Elements_Title.php'); + +require_once('OFC/Elements/OFC_Elements_Dot_Value.php'); +require_once('OFC/Elements/OFC_Elements_Tooltip.php'); +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |