コード例 #1
0
ファイル: List_Item.php プロジェクト: TuxBoy/Demo-saf
 /**
  * @param $content string
  */
 public function __construct($content = null)
 {
     parent::__construct('li');
     if (isset($content)) {
         $this->setContent($content);
     }
 }
コード例 #2
0
ファイル: Row.php プロジェクト: TuxBoy/Demo-saf
 /**
  * @return string
  */
 public function __toString()
 {
     if (count($this->cells) > 1) {
         $this->setContent(LF . join(LF, $this->cells) . LF);
     } else {
         $this->setContent(join('', $this->cells));
     }
     return parent::__toString();
 }
コード例 #3
0
ファイル: Table.php プロジェクト: TuxBoy/Demo-saf
 /**
  * @return string
  */
 public function __toString()
 {
     $content = '';
     if (isset($this->head)) {
         $content .= LF . $this->head;
     }
     if (isset($this->body)) {
         $content .= LF . $this->body;
     }
     $this->setContent($content . LF);
     return LF . parent::__toString() . LF;
 }
コード例 #4
0
ファイル: Unordered_List.php プロジェクト: TuxBoy/Demo-saf
 /**
  * @return string
  */
 public function getContent()
 {
     $content = parent::getContent();
     if (!isset($content)) {
         $items = $this->items;
         asort($items);
         $content = '';
         foreach ($items as $item) {
             $content .= new List_Item($item);
         }
         $this->setContent($content);
     }
     return $content;
 }
コード例 #5
0
ファイル: Section.php プロジェクト: TuxBoy/Demo-saf
 /**
  * @return string
  */
 public function __toString()
 {
     $this->setContent(LF . join(LF, $this->rows) . LF);
     return parent::__toString();
 }
コード例 #6
0
ファイル: Html_Builder_Type.php プロジェクト: TuxBoy/Demo-saf
 /**
  * @param $element Element
  */
 private function setOnChangeAttribute(Element $element)
 {
     if ($this->on_change) {
         $on_change = join(',', $this->on_change);
         $element->setData('on-change', $on_change);
     }
 }
コード例 #7
0
ファイル: Option.php プロジェクト: TuxBoy/Demo-saf
 /**
  * @return string
  * @todo This is a patch to make Html_Option::getContent work. Remove this when it will work
  */
 public function getContent()
 {
     return parent::getContent();
 }