topical media & game development

talk show tell print

professional-php-04-border-decorator.php / php



  <?php
  
  require_once("abstract_widget.php");
  
  class BorderDecorator extends Widget {
  
    private widget;
    
    function __construct(Widget & widget) {
           this->widget = widget;
    }
  
    public function draw() {
           
           this->widget->update(this->getSubject());
           
           echo  "<table border=0 cellpadding=1 bgcolor=#3366ff>";
           echo  "<tr bgcolor=#ffffff><td>";     
           this->widget->draw();
           echo "</td></tr></table>";
    }
  }
  ?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.