[ class tree: phpchartPlus ] [ index: phpchartPlus ] [ all elements ]

Source for file ConfigStrategy_Interface.php

Documentation is available at ConfigStrategy_Interface.php

  1. <?php
  2.  
  3. /*
  4. **************************************************
  5. Class: ConfigStrategy_Interface.php
  6. **************************************************
  7. Author: Tsiavos Chris <jaames@freemail.gr>
  8. Date: October 2004
  9. **************************************************/
  10.  
  11. class ConfigStrategy_Exception extends Exception {
  12. function ConfigStrategy_Exception($data) {
  13. Exception::__construct($data);
  14. }
  15.  
  16. }
  17.  
  18. /**Common communication structure between ConfigStrategy objects and ConfigParser
  19. *@author Tsiavos Chris <jaames@freemail.gr>
  20. *@license http://opensource.org/licenses/gpl-license.php GNU Public License
  21. */
  22. class ConfigData {
  23.  
  24. /*
  25. *@access public
  26. *@var integer
  27. */
  28. public $ImageWidth;
  29. /**
  30. *@access public
  31. *@var integer
  32. */
  33. public $ImageHeight;
  34. /**
  35. *@access public
  36. *@var string ("PNG","JPEG","GIF")
  37. */
  38. public $ImageOutputType;
  39. /**
  40. *@access public
  41. *@var string
  42. */
  43. public $ChartTitle;
  44. /**
  45. *@access public
  46. *@var string ("Bar","Line","Area","Pie")
  47. */
  48. public $ChartType;
  49. /**
  50. *@access public
  51. *@var string ("yes","no")
  52. */
  53. public $ChartUseBlending;
  54. /**
  55. *@access public
  56. *@var string ("Yes","No")
  57. */
  58. public $ChartUseAntialias;
  59. /**
  60. *@access public
  61. *@var integer
  62. */
  63. public $ChartHmargin;
  64. /**
  65. *@access public
  66. *@var integer
  67. */
  68. public $ChartVmargin;
  69. /**
  70. *@access public
  71. *@var string ("yes","no")
  72. */
  73. public $ChartUseStatus;
  74. /**
  75. *@access public
  76. *@var string
  77. */
  78. public $ImageColor_Start;
  79. /**
  80. *@access public
  81. *@var string
  82. */
  83. public $ImageColor_Finish;
  84. /**
  85. *@access public
  86. *@var integer
  87. */
  88. public $ImageColor_Alpha;
  89. /**
  90. *@access public
  91. *@var string
  92. */
  93. public $ChartColor_Start;
  94. /**
  95. *@access public
  96. *@var string
  97. */
  98. public $ChartColor_Finish;
  99. /**
  100. *@access public
  101. *@var integer
  102. */
  103. public $ChartColor_Alpha;
  104. /**
  105. *@access public
  106. *@var string
  107. */
  108. public $ChartBgImage;
  109. /**
  110. *@access public
  111. *@var string
  112. */
  113. public $FontFileLocation;
  114. /**
  115. *@access public
  116. *@var string
  117. */
  118. public $FontColor;
  119. /**
  120. *@access public
  121. *@var integer
  122. */
  123. public $FontWidth;
  124. /**
  125. *@access public
  126. *@var integer
  127. */
  128. public $FontHeight;
  129. /**
  130. *@access public
  131. *@var integer
  132. */
  133. public $FontSize;
  134. /**
  135. *@access public
  136. *@var string[]
  137. */
  138. public $LegendColors=array();
  139. /**
  140. *@access public
  141. *@var integer[]
  142. */
  143. public $LegendColors_Alpha=array();
  144. /**
  145. *@access public
  146. *@var integer
  147. */
  148. public $GridNum;
  149. /**
  150. *@access public
  151. *@var integer
  152. */
  153. public $GridMinValue;
  154. /**
  155. *@access public
  156. *@var integer
  157. */
  158. public $GridMaxValue;
  159. /**
  160. *@access public
  161. *@var string
  162. */
  163. public $GridColor;
  164.  
  165. }
  166.  
  167. /**
  168. *Interface for ConfigStrategy Objects
  169. *ConfigStrategy objects is an effort to make phpchartPlus able to parse
  170. *configuration data from multiple sources in a flexible way, that allows
  171. *expansion with the inclusion of new types of configuration sources in a totally
  172. *transparent way to the application. To achieve this the concept that varies (the different
  173. *ways of collecting configuration data) is being encapsulated into seperate (Strategy) objects.
  174. *Transparency is achieved through a common interface for all (Strategy) objects which allows
  175. * the runtime selection of strategy objects based on some user-defined parameters.
  176. *Users that want to add a new type of configuration source must implement the ConfigStrategy_Interface.
  177. *<br>For more info read the Strategy Pattern
  178. *@link http://c2.com/cgi/wiki?StrategyPattern
  179. *@interface
  180. *@author Tsiavos Chris <jaames@freemail.gr>
  181. *@license http://opensource.org/licenses/gpl-license.php GNU Public License
  182. */
  183.  
  184. Interface ConfigStrategy_Interface {
  185. /**
  186. *Initializes the ConfigStrategy object
  187. *@access public
  188. *@return void
  189. *@param mixed $params Passes an arbitrary numbers of parameters in the ConfigStrategy Object
  190. */
  191. public function initialize($params=NULL);
  192. /**
  193. /**
  194. *Reads and returns the configuration data to the client
  195. *@access public
  196. *@return ConfigData Class defining a common communication structure between ConfigStrategy
  197. *oobjects and ConfigParser
  198. *@param mixed $params Passes an arbitrary numbers of parameters in the ConfigStrategy Object
  199. */
  200. public function readData($params=NULL); //returns ConfigData
  201. /**
  202. /**
  203. *Finalizes the ConfigStrategy object
  204. *@access public
  205. *@return void
  206. */
  207. public function finalize();
  208.  
  209.  
  210.  
  211.  
  212. ?>

Documentation generated on Sun, 3 Oct 2004 14:59:10 +0300 by phpDocumentor 1.3.0RC3