Source for file ABSTHTMLTag.class.php
Documentation is available at ABSTHTMLTag.class.php
* All prefixes like "ABST" for classname means that the class is abstract.
include_once CLASSPATH. "data_structures/ABSTObject.class.php";
* An abstract class to create HTML-Tags.
* @author Daniel Plücken <daniel@debakel.net>
* @license http://www.gnu.org/copyleft/lesser.html
* GNU Lesser General Public License
* @copyright Copyright (c) 2004 Daniel Plücken <daniel@debakel.net>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
* The value of the "name"-attribute of this item.
* The value of the "id"-attribute of this item.
* The value of the "class"-attribute of this item.
* @var string $style_class
* Can filled with attributes who where not a standard for this item-tag.
* @var string $other_attributes
* Can filled with styledefinitions that were not handled by an implemented
* Stores whether the HTML-elements should format by "\r\n" in the source.
* @var boolean $no_format
* The Constructor let the script die, cause this is an abstract class!
* @author Daniel Plücken <daniel@debakel.net>
{ die( "HTMLTag is an abstract class. You cannot get an instance of it." ); }
* Returns the value of this tag's "name"-attribute.
* @author Daniel Plücken <daniel@debakel.net>
* Returns the value of this tag's "id"-attribute.
* @author Daniel Plücken <daniel@debakel.net>
* Stores all used ids and makes sure that every id in the document is
* unique. It should called in every get method of classes in the packages
* @author Daniel Plücken <daniel@debakel.net>
* @param boolean $bool_store
function idExists( $str_id, $bool_store = false )
static $id_arr = array();
if ( in_array( $str_id, $id_arr ) )
if ( preg_match( "!^(.+)\_(\d+)?$!", $str_id, $match_arr ) )
$start = intval( $match_arr[2] ) + 1;
$match_arr[1] = $helper = $str_id;
for ( $i = $start; in_array( $helper, $id_arr ); $i++ )
$helper = $match_arr[1]. "_". $i;
$this->id = $id_arr[] = $str_id;
* Stores the value of this tag's "name"-attribute.
* @author Daniel Plücken <daniel@debakel.net>
{ $this->name = $string; }
* Stores the value of this item's "id"-attribute.
* @author Daniel Plücken <daniel@debakel.net>
function setId( $string )
* Set the value of the class-attribute of this tag.
* @author Daniel Plücken <daniel@debakel.net>
* Set the value of style definitions that are not handled by implemented
* @author Daniel Plücken <daniel@debakel.net>
* This method allows to set the attributes of the tag that are not handled
* @author Daniel Plücken <daniel@debakel.net>
* Sets the value of the focus-attribute of this html-tag.
* @author Daniel Plücken <daniel@debakel.net>
{ $this->focus = $string; }
* Sets the value of the blur-attribute of this html-tag.
* @author Daniel Plücken <daniel@debakel.net>
{ $this->blur = $string; }
* Sets the value of the click-attribute of this html-tag.
* @author Daniel Plücken <daniel@debakel.net>
{ $this->click = $string; }
* Sets the value of the mouseup-attribute of this html-tag.
* @author Daniel Plücken <daniel@debakel.net>
* Sets the value of the mouseover-attribute of this html-tag.
* @author Daniel Plücken <daniel@debakel.net>
* Sets the value of the mouseout-attribute of this html-tag.
* @author Daniel Plücken <daniel@debakel.net>
* Sets the value of the mousemove-attribute of this html-tag.
* @author Daniel Plücken <daniel@debakel.net>
* Stores that the HTML-elements should not format by "\r\n" in the source.
* @author Daniel Plücken <daniel@debakel.net>
} // End of class HTMLTag
|