Changeset 54 for trunk/examples/Complex2.php
- Timestamp:
- 11/29/06 23:05:33 (2 years ago)
- Files:
-
- trunk/examples/Complex2.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/examples/Complex2.php
r37 r54 2 2 /** 3 3 * example complex 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 complex class 10 * 10 * 11 11 * @package XJConf 12 12 * @subpackage examples … … 34 34 /** 35 35 * an integer example 36 * 36 * 37 37 * @var int 38 38 */ 39 39 private $size = 1; 40 40 41 41 /** 42 42 * constructor 43 * 43 * 44 44 * @param string $data 45 45 */ … … 48 48 $this->data = $data; 49 49 } 50 50 51 51 /** 52 52 * set the color string … … 58 58 $this->colorString = $colorString; 59 59 } 60 60 61 61 /** 62 62 * set the color … … 68 68 $this->color = $color; 69 69 } 70 70 71 71 /** 72 72 * set the size … … 78 78 $this->size = $size; 79 79 } 80 80 81 81 /** 82 82 * render all known data … … 87 87 { 88 88 if (null == $this->color) { 89 return '<font color="' . $this->colorString . '" size="' . $this->size . '">' . $this->data . '</font>'; 90 } else {89 return '<font color="' . $this->colorString . '" size="' . $this->size . '">' . $this->data . '</font>'; 90 } else { 91 91 return '<font title="This text is written in ' . $this->color->getName() . ' (' . $this->color->getColorTitle() . ')" color="' . $this->color->getRGB() . '" size="' . $this->size . '">' . $this->data . '</font>'; 92 } 92 } 93 93 } 94 94 }
