Source for file AElementLayout.php

Documentation is available at AElementLayout.php

  1. <?
  2. /**
  3.  * AElementLayout
  4.  *
  5.  * @package Alia
  6.  * @subpackage Layouts
  7.  */
  8.  
  9.  
  10. /**
  11.  * AElementLayout
  12.  *
  13.  * A very simple layout for widgets that represent a single element
  14.  *
  15.  * @package Alia
  16.  * @subpackage Layouts
  17.  *
  18.  */
  19. class AElementLayout extends ALayout
  20. {
  21.  
  22.     public function render(){
  23.         $widget=$this->getMainWidget();
  24.         $buffer"<".$widget->getTagName()." ".$this->getAttributeHTML();
  25.         $buffer.= ($html=$widget->getInnerHTML()) ">$html</".$widget->getTagName().">" " />";
  26.         return $buffer;
  27.     }
  28.  
  29.     public function addWidget(AWidget $widget,$key=null){
  30.             if(!$widget instanceof AHTMLElement ){
  31.                 throw new Exception("widget is not of type AHTMLWidget!");
  32.             }
  33.             $this->__widgets=$widget;
  34.     }
  35.  
  36. // end of ASimpleLayout
  37. ?>

Documentation generated on Fri, 11 Jul 2008 13:28:39 -0400 by phpDocumentor 1.4.2