/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/tag_classes/ALLTAGS.inc
ViewVC logotype

Diff of /nfo/php/libs/com.newsblob.phphtmllib/tag_classes/ALLTAGS.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jonen, Sat Feb 22 21:07:58 2003 UTC revision 1.5 by joko, Wed Jul 7 02:24:10 2004 UTC
# Line 14  Line 14 
14    
15  /**  /**
16   * <A> tag class   * <A> tag class
17     * @tutorial HTMLTagClass.cls#constructor
18   * @package phpHtmlLib   * @package phpHtmlLib
19   */   */
20  class Atag extends HTMLTagClass {  class Atag extends HTMLTagClass {
# Line 353  class DLtag extends HTMLTagClass { Line 354  class DLtag extends HTMLTagClass {
354  } // DLtag  } // DLtag
355    
356  /**  /**
357     * <!DOCTYPE> tag class
358     * @package phpHtmlLib
359     */
360    class DOCTYPEtag extends HTMLTagClass {
361        var $_tag = "!DOCTYPE";
362    
363        function _set_flags() {
364            parent::_set_flags();
365            $this->_flags &= ~(_CONTENTREQUIRED | _CLOSETAGREQUIRED);
366            $this->_flags |= _ALWAYS_UPPERCASE | _NOFINISHSLASHXHTML;
367        }
368    } //!DOCTYPEtag
369    
370    /**
371   * <DT> tag class   * <DT> tag class
372   *   *
373   * The <dt> tag defines the start of a   * The <dt> tag defines the start of a
# Line 425  class FONTtag extends HTMLTagClass { Line 440  class FONTtag extends HTMLTagClass {
440   */   */
441  class FORMtag extends HTMLTagClass {  class FORMtag extends HTMLTagClass {
442      var $_tag = "form";      var $_tag = "form";
443        var $_xhtml_strict_attributes = array("name", "target");
444  } // FORMtag  } // FORMtag
445    
446    
# Line 582  class HRtag extends HTMLTagClass { Line 598  class HRtag extends HTMLTagClass {
598      var $_tag = "hr";      var $_tag = "hr";
599      function _set_flags() {      function _set_flags() {
600          parent::_set_flags();          parent::_set_flags();
601          $this->_flags &= ~_NEWLINEAFTEROPENTAG;          $this->_flags &= ~(_NEWLINEAFTEROPENTAG | _CONTENTREQUIRED | _CLOSETAGREQUIRED);
602      }      }
603  } // HRtag  } // HRtag
604    
# Line 641  class IFRAMEtag extends HTMLTagClass { Line 657  class IFRAMEtag extends HTMLTagClass {
657  class IMGtag extends HTMLTagClass {  class IMGtag extends HTMLTagClass {
658      var $_tag = "img";      var $_tag = "img";
659      var $_debug_link_attributes = array("src");      var $_debug_link_attributes = array("src");
660      var $_xhtml_strict_attributes = array("border");      //var $_xhtml_strict_attributes = array("border");
661      var $_htmlentities_attributes = array("src");      var $_htmlentities_attributes = array("src");
662      function _set_flags() {      function _set_flags() {
663          parent::_set_flags();          parent::_set_flags();
# Line 1020  class PARAMtag extends HTMLTagClass { Line 1036  class PARAMtag extends HTMLTagClass {
1036   */   */
1037  class PREtag extends HTMLTagClass {  class PREtag extends HTMLTagClass {
1038      var $_tag = "pre";      var $_tag = "pre";
1039        function _set_flags() {
1040            parent::_set_flags();
1041            $this->_flags &= ~_INDENT;
1042        }
1043  } // PREtag  } // PREtag
1044    
1045    
# Line 1242  class TABLEtag extends HTMLTagClass { Line 1262  class TABLEtag extends HTMLTagClass {
1262    
1263          for ($x=0; $x <= func_num_args()-1; $x++) {          for ($x=0; $x <= func_num_args()-1; $x++) {
1264              if (is_object($args[$x])) {              if (is_object($args[$x])) {
1265                  if ($args[$x]->_tag == "td") {                  if (isset($args[$x]->_tag) && $args[$x]->_tag == "td") {
1266                      $tr->add( $args[$x] );                      $tr->add( $args[$x] );
1267                  } else if ($args[$x]->_tag == "tr") {                  } else if (isset($args[$x]->_tag) && $args[$x]->_tag == "tr") {
1268                      //the user is trying to use this                      //the user is trying to use this
1269                      //to add a TR object.                      //to add a TR object.
1270                      if ($tr->count_content() >= 1) {                      if ($tr->count_content() >= 1) {
# Line 1293  class TABLEtag extends HTMLTagClass { Line 1313  class TABLEtag extends HTMLTagClass {
1313       * any attributes set for the <tr> it won't use       * any attributes set for the <tr> it won't use
1314       * the defaults.       * the defaults.
1315       *       *
1316         * {@source }
1317       * @param array $attributes - the default attributes       * @param array $attributes - the default attributes
1318         * @return none
1319       */       */
1320      function set_default_row_attributes( $attributes ) {      function set_default_row_attributes( $attributes ) {
1321    
# Line 1306  class TABLEtag extends HTMLTagClass { Line 1328  class TABLEtag extends HTMLTagClass {
1328       * any attributes set for the <td> it won't use       * any attributes set for the <td> it won't use
1329       * the defaults.       * the defaults.
1330       *       *
1331         * {@source }
1332       * @param array $attributes - the default attributes       * @param array $attributes - the default attributes
1333         * @return none
1334       */       */
1335      function set_default_col_attributes( $attributes ) {      function set_default_col_attributes( $attributes ) {
1336    
# Line 1318  class TABLEtag extends HTMLTagClass { Line 1342  class TABLEtag extends HTMLTagClass {
1342      /**      /**
1343       * update the attributes of a particular element or td.       * update the attributes of a particular element or td.
1344       *       *
1345         * {@source }
1346       * @param int $row    row # of the table to edit       * @param int $row    row # of the table to edit
1347       * @param int $col    column # of the table to edit       * @param int $col    column # of the table to edit
1348       * @param array   $attributes array of name=>value pairs       * @param array   $attributes array of name=>value pairs
1349       * @public       * @return none
      *  
1350       */       */
1351      function set_cell_attributes( $row, $col, $attributes=array() ) {      function set_cell_attributes( $row, $col, $attributes=array() ) {
1352    
# Line 1336  class TABLEtag extends HTMLTagClass { Line 1360  class TABLEtag extends HTMLTagClass {
1360      /**      /**
1361       * update the attributes of a particular row or tr.       * update the attributes of a particular row or tr.
1362       *       *
1363         * {@source }
1364       * @param int $row    row # of the table to edit       * @param int $row    row # of the table to edit
1365       * @param int $col    column # of the table to edit       * @param int $col    column # of the table to edit
1366       * @param array   $attributes array of name=>value pairs       * @param array   $attributes array of name=>value pairs
1367       * @public       * @return mixed -1 if the row doesn't exist already
      *  
1368       */       */
1369      function set_row_attributes( $row, $attributes ) {      function set_row_attributes( $row, $attributes ) {
1370          if ($this->_content[$row]) {          if ($this->_content[$row]) {
# Line 1350  class TABLEtag extends HTMLTagClass { Line 1374  class TABLEtag extends HTMLTagClass {
1374          }          }
1375      }      }
1376    
1377        /**
1378         * This method sets/resets the content for a specific
1379         * cell in the table
1380         *
1381         * {@source }
1382         * @param int the row number
1383         * @param int the column number
1384         * @param mixed the cell content
1385         * @return mixed -1 if the cell doesn't exist already
1386         */
1387      function set_cell_content( $row, $col, $content) {      function set_cell_content( $row, $col, $content) {
1388    
1389          $item = &$this->_get_element($row);          $item = &$this->_get_element($row);
# Line 1365  class TABLEtag extends HTMLTagClass { Line 1399  class TABLEtag extends HTMLTagClass {
1399          }          }
1400      }      }
1401    
1402        /**
1403         * This method is used to set a summary
1404         * attribute on the table for speech-synthesizing
1405         * non-visual browsers
1406         *
1407         * {@source }
1408         * @param string the summary
1409         * @return none
1410         */
1411        function set_summary($summary) {
1412            $this->set_tag_attribute("summary", $summary);
1413        }
1414    
1415  } // TABLEtag  } // TABLEtag
1416    
1417  /**  /**
# Line 1401  class TBODYtag extends TABLEtag { Line 1448  class TBODYtag extends TABLEtag {
1448   */   */
1449  class TDtag extends HTMLTagClass {  class TDtag extends HTMLTagClass {
1450      var $_tag = "td";      var $_tag = "td";
1451    
1452        /**
1453         * This is a helper for setting the colspan
1454         * attribute
1455         *
1456         * @param int - the colspan value
1457         */
1458        function set_colspan($colspan) {
1459            $this->set_tag_attribute('colspan', (int)$colspan);
1460        }
1461    
1462        /**
1463         * This is a helper for setting the rowspan
1464         * attribute
1465         *
1466         * @param int - the rowspan value
1467         */
1468        function set_rowspan($rowspan) {
1469            $this->set_tag_attribute('rowspan', (int)$rowspan);
1470        }
1471    
1472    
1473  }// TDtag  }// TDtag
1474    
1475    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed