Changeset 43 for trunk/examples/Color.php
- Timestamp:
- 11/21/06 20:45:41 (2 years ago)
- Files:
-
- trunk/examples/Color.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/examples/Color.php
r27 r43 2 2 /** 3 3 * example class 4 * 4 * 5 5 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 6 6 * @author Frank Kleine <frank.kleine@schlund.de> … … 8 8 /** 9 9 * example class 10 * 10 * 11 11 * @package XJConf 12 12 * @subpackage examples … … 50 50 * @var string $name name of the color 51 51 */ 52 public function __construct($name )52 public function __construct($name = null) 53 53 { 54 54 $this->name = $name; 55 55 } 56 56 57 57 /** 58 58 * set the red part … … 64 64 $this->red = $val; 65 65 } 66 66 67 67 /** 68 68 * set the green part … … 74 74 $this->green = $val; 75 75 } 76 76 77 77 /** 78 78 * set the blue part … … 84 84 $this->blue = $val; 85 85 } 86 86 87 87 /** 88 88 * set the title of the color … … 94 94 $this->colorTitle = $title; 95 95 } 96 96 97 97 /** 98 98 * get the rgb value as hex … … 104 104 return '#' . dechex($this->red) . dechex($this->green) . dechex($this->blue); 105 105 } 106 106 107 107 /** 108 108 * return the name of the color … … 114 114 return $this->name; 115 115 } 116 116 117 117 /** 118 118 * return the title of the color … … 124 124 return $this->colorTitle; 125 125 } 126 126 127 127 /** 128 128 * returns string representation 129 * 129 * 130 130 * @return string 131 131 */
