| <?php |
| class Bundle { |
| private $label; |
| private $link; |
| private $size; |
| private $summary; |
| |
| function __construct( $label, $link, $size, $summary ) { |
| $this->label = $label; |
| $this->link = $link; |
| $this->size = $size; |
| $this->summary = $summary; |
| } |
| |
| function getLabel() { |
| return $this->label; |
| } |
| |
| function getLink() { |
| return $this->link; |
| } |
| |
| function getSize() { |
| return $this->size; |
| } |
| |
| function getSummary() { |
| return $this->summary; |
| } |
| |
| function render() { |
| $result = $result . "<a href=\"" . $this->link . "\">" . $this->label . "</a>"; |
| |
| if ( strlen( $this->size) > 0 ) |
| $result = $result . " <small>(" . $this->size . ")</small>" ; |
| if ( strlen($this->summary) >0 ) |
| $result = $result . "<br/><small>" . $this->summary . "</small>"; |
| |
| return $result; |
| } |
| } |
| ?> |