HtmlTemplateFramework
[ class tree: HtmlTemplateFramework ] [ index: HtmlTemplateFramework ] [ all elements ]

Source for file htf_tag_tr.phl

Documentation is available at htf_tag_tr.phl

  1. <?php
  2. /**
  3.  * htf_tag_trクラス
  4.  *
  5.  * htmlのtrタグ情報を保有・生成するクラス
  6.  *
  7.  * @package HtmlTemplateFramework
  8.  * @subpackage htmltagbase
  9.  * @access  public
  10.  * @author    Yamauchi Shogo <htf@as-prj.com>
  11.  * @version $Id: htf_tag_tr.phl ,v 1.0 $
  12.  ***/
  13. require_once("htf_com_define.inc");        //共通定数
  14. require_once("htf_com_func.inc");        //共通関数
  15. require_once("htf_tag_element.phl");    //エレメントクラス
  16.  
  17. /**
  18.  * htmlのtrタグ情報を保有・生成するクラス
  19.  * 
  20.  * htmlのtrタグを保有し、保有している内容でhtmlのtrタグ記述を生成します。
  21.  *
  22.  * @access  public
  23.  * @author    Yamauchi Shogo <htf@as-prj.com>
  24.  ***/
  25. class htf_tag_tr extends htf_tag_element {
  26.  
  27.     /**
  28.      * コンストラクタ
  29.      *
  30.      * 引数の大文字小文字出力指定を参照し、htf_tag_trを生成します。
  31.      *
  32.      * @param     int    $strelement_case  大文字・小文字出力(デフォルトは小文字)
  33.      * @return    void 
  34.      ***/
  35.     function htf_tag_tr($strelement_case=HTF_CASE_LOWER{
  36.         parent::htf_tag_element("tr"TRUE$strelement_case);
  37.     }
  38.  
  39.     /**
  40.      * 保持しているカラム数を返します。
  41.      *
  42.      * @return    int    成功時:保持している行数
  43.      ***/
  44.     function columns({
  45.         return count($this->contents);
  46.     }
  47.  
  48.     /**
  49.      * add_col()
  50.      *
  51.      * 引数のオブジェクト(htf_tag_td/htf_tag_th)を、追加します。
  52.      *
  53.      * @param     mixed  $tdth        追加するhtf_tag_td/htf_tag_thタグオブジェクト
  54.      * @return    int    成功時:追加後のthead内要素数 失敗時:-1
  55.      ***/
  56.     function add_column($tdth{
  57.         //カラムオブジェクト追加
  58.         $ret $this->add_content($tdth);
  59.         if ($ret == -1{
  60.             //行オブジェクト追加失敗
  61.             return -1;
  62.         }
  63.         //要素内容数を返す
  64.         return count($this->contents);
  65.     }
  66.  
  67. }
  68.  
  69. ?>

Documentation generated on Tue, 19 Sep 2006 06:21:24 +0900 by phpDocumentor 1.3.0