class.ListItem.php

Go to the documentation of this file.
00001 <?php
00002   /*
00003    This  file is part  of WikiConverter.   WikiConverter is  a program
00004    that  converts   text/wiki  into   other  formats  (like   html  or
00005    xml/docbook).
00006 
00007    Copyright (c) 2005 Dashamir Hoxha, dhoxha@inima.al
00008 
00009    WikiConverter  is free  software;  you can  redistribute it  and/or
00010    modify  it under the  terms of  the GNU  General Public  License as
00011    published by the Free Software  Foundation; either version 2 of the
00012    License, or (at your option) any later version.
00013 
00014    WikiConverter is  distributed in the  hope that it will  be useful,
00015    but  WITHOUT ANY  WARRANTY; without  even the  implied  warranty of
00016    MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU
00017    General Public License for more details.
00018 
00019    You should have  received a copy of the  GNU General Public License
00020    along  with  WikiConverter; if  not,  write  to  the Free  Software
00021    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00022    USA
00023   */
00024 
00029 class ListItem extends Tpl
00030 {
00031   function ListItem()
00032   {
00033     static $id = 'ListItem_01';
00034                 
00035     Tpl::Tpl('ListItem');
00036     $this->id = $id++;
00037   }
00038 
00039   function to_html($indent, $class)
00040   {
00041     $arr_subtpl = $this->get_subtemplates();
00042     $html = "\n$indent<li $class>" . Tpl::to_html($indent);
00043     if (sizeof($arr_subtpl)!=0)  $html .= $indent;
00044     $html .= "</li>\n";
00045     return $html;
00046   }
00047 
00048   function to_xml($indent)
00049   {
00050     $arr_subtpl = $this->get_subtemplates();
00051     $html = "\n$indent<listitem><para>" . Tpl::to_xml($indent);
00052     if (sizeof($arr_subtpl)!=0)  $html .= $indent;
00053     $html .= "</para></listitem>\n";
00054     return $html;
00055   }
00056 }
00057 ?>

Generated on Wed Jan 9 08:27:32 2008 for DokBookWiki by  doxygen 1.5.2