cvs: php4 /pear/HTML Common.php

From: Date: Sat, 24 Mar 2001 04:33:11 +0000
Subject: cvs: php4 /pear/HTML Common.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4823@lists.php.net to get a copy of this message
adaniel Fri Mar 23 20:33:11 2001 EDT Modified files: /php4/pear/HTML Common.php Log: added setComment Index: php4/pear/HTML/Common.php diff -u php4/pear/HTML/Common.php:1.5 php4/pear/HTML/Common.php:1.6 --- php4/pear/HTML/Common.php:1.5 Thu Mar 22 18:13:18 2001 +++ php4/pear/HTML/Common.php Fri Mar 23 20:33:10 2001 @@ -16,13 +16,13 @@ // | Authors: Adam Daniel <adaniel1@eesus.jnj.com> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.5 2001/03/23 02:13:18 adaniel Exp $ +// $Id: Common.php,v 1.6 2001/03/24 04:33:10 adaniel Exp $ /** * Base class for all HTML classes * * @author Adam Daniel <adaniel1@eesus.jnj.com> - * @version 1.3 + * @version 1.4 * @since PHP 4.0.3pl1 * @abstract */ @@ -41,6 +41,14 @@ * @access private */ var $_tabOffset = 0; + + /** + * HTML comment on the object + * @var string + * @since 1.4 + * @access private + */ + var $_comment = ""; /** * Class constructor @@ -61,7 +69,7 @@ */ function apiVersion() { - return 1.3; + return 1.4; } // end func apiVersion /** @@ -136,6 +144,9 @@ */ function _updateAttrArray(&$attr1, $attr2) { + if (!is_array($attr2)) { + return false; + } while (list($key, $value) = each($attr2)) { if (!is_int($key)) { $attr1[$key] = $value; @@ -194,6 +205,20 @@ } // end func setTabOffset /** + * Sets the HTML comment to be displayed at the beginning of the HTML string + * + * @param string + * @since 1.4 + * @access public + * @return void + * @throws + */ + function setComment($comment) + { + $this->_comment = $comment; + } // end func setHtmlComment + + /** * Abstract method. Must be extended to return the objects HTML * * @access public @@ -217,3 +242,4 @@ } // end class HTML_Common ?> +

« previous php.cvs (#4823) next »