Documentation is available at ConfigStrategy_Interface.php
<?php /* ************************************************** Class: ConfigStrategy_Interface.php ************************************************** Author: Tsiavos Chris <jaames@freemail.gr> Date: October 2004 **************************************************/ class ConfigStrategy_Exception extends Exception { function ConfigStrategy_Exception($data) { Exception::__construct($data); } } /**Common communication structure between ConfigStrategy objects and ConfigParser *@author Tsiavos Chris <jaames@freemail.gr> *@license http://opensource.org/licenses/gpl-license.php GNU Public License */ class ConfigData { /* *@access public *@var integer */ public $ImageWidth; /** *@access public *@var integer */ public $ImageHeight; /** *@access public *@var string ("PNG","JPEG","GIF") */ public $ImageOutputType; /** *@access public *@var string */ public $ChartTitle; /** *@access public *@var string ("Bar","Line","Area","Pie") */ public $ChartType; /** *@access public *@var string ("yes","no") */ public $ChartUseBlending; /** *@access public *@var string ("Yes","No") */ public $ChartUseAntialias; /** *@access public *@var integer */ public $ChartHmargin; /** *@access public *@var integer */ public $ChartVmargin; /** *@access public *@var string ("yes","no") */ public $ChartUseStatus; /** *@access public *@var string */ public $ImageColor_Start; /** *@access public *@var string */ public $ImageColor_Finish; /** *@access public *@var integer */ public $ImageColor_Alpha; /** *@access public *@var string */ public $ChartColor_Start; /** *@access public *@var string */ public $ChartColor_Finish; /** *@access public *@var integer */ public $ChartColor_Alpha; /** *@access public *@var string */ public $ChartBgImage; /** *@access public *@var string */ public $FontFileLocation; /** *@access public *@var string */ public $FontColor; /** *@access public *@var integer */ public $FontWidth; /** *@access public *@var integer */ public $FontHeight; /** *@access public *@var integer */ public $FontSize; /** *@access public *@var string[] */ public $LegendColors=array(); /** *@access public *@var integer[] */ public $LegendColors_Alpha=array(); /** *@access public *@var integer */ public $GridNum; /** *@access public *@var integer */ public $GridMinValue; /** *@access public *@var integer */ public $GridMaxValue; /** *@access public *@var string */ public $GridColor; } /** *Interface for ConfigStrategy Objects *ConfigStrategy objects is an effort to make phpchartPlus able to parse *configuration data from multiple sources in a flexible way, that allows *expansion with the inclusion of new types of configuration sources in a totally *transparent way to the application. To achieve this the concept that varies (the different *ways of collecting configuration data) is being encapsulated into seperate (Strategy) objects. *Transparency is achieved through a common interface for all (Strategy) objects which allows * the runtime selection of strategy objects based on some user-defined parameters. *Users that want to add a new type of configuration source must implement the ConfigStrategy_Interface. *<br>For more info read the Strategy Pattern *@link http://c2.com/cgi/wiki?StrategyPattern *@interface *@author Tsiavos Chris <jaames@freemail.gr> *@license http://opensource.org/licenses/gpl-license.php GNU Public License */ Interface ConfigStrategy_Interface { /** *Initializes the ConfigStrategy object *@access public *@return void *@param mixed $params Passes an arbitrary numbers of parameters in the ConfigStrategy Object */ public function initialize($params=NULL); /** /** *Reads and returns the configuration data to the client *@access public *@return ConfigData Class defining a common communication structure between ConfigStrategy *oobjects and ConfigParser *@param mixed $params Passes an arbitrary numbers of parameters in the ConfigStrategy Object */ public function readData($params=NULL); //returns ConfigData /** /** *Finalizes the ConfigStrategy object *@access public *@return void */ public function finalize(); ?>