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

Class: HTML

Source Location: /HTML.php

Class Overview

Strings
   |
   --HTML

This class manages HTML objects.


Author(s):

Version:

  • 1.5

Variables

Methods


Child classes:

HTMLdivs
This class manages HTMLdivs objects.
HTMLforms
This class manages HTMLforms objects. This class creates xHTML forms.
HTMLhs
This class manages HTMLhs objects. This class creates xHTML Hx titles.
HTMLinputs
This class manages HTMLinputs objects. This class creates xHTML inputs.
HTMLlabels
This class manages xHTML Labels objects.
HTMLlinks
This class manages HTMLlinks objects.
HTMLps
This class manages HTMLps objects. This class creates xHTML Paragraphs.
HTMLselects
This class manages HTML select lists objects.
HTMLtables
This class manages HTMLtables objects. This class creates xHTML tables.
HTMLtextareas
This class manages HTML Textareas objects.

Inherited Variables

Inherited Methods

Class: Strings

Strings::__construct()
Construction function
Strings::console()
Console function
Strings::IsUTF8()
UTF8 detection function
Strings::QuoteStrip()
Quotes stripping function
Strings::RemoveAccent()
Accents removal function
Strings::RemoveSpaces()
Spaces removal function
Strings::stringHasNumbers()
Numbers detection function
Strings::ToUTF8()
UTF8 conversion function
Strings::ucwordsw()
Special uppercase function

Class Details

[line 38]
This class manages HTML objects.

Created on 08 apr 09

Changes: 1.4 -> 1.5: 12 aug 09 added: $selected flag for HTMLOpenTag() function 1.3 -> 1.4: 15 jul 09 updated: file is PEAR compatible 1.2 -> 1.3: 06 may 09 added: $forvalue (used for labels) added: $cols and $rows (used for textareas) added: to HTML package 1.1 -> 1.2: 28 apr 09 suppressed: $elementvalue for HTMLOpenTag() updated: htmlentities() for value and action for HTMLOpenTag() added: form variables




Tags:

author:  Pierre-Dominique Vienne <pvienne@me.com>
version:  1.5
license:  GNU Public License


[ Top ]


Class Variables

$class =

[line 59]

Variable that contains class parameter



Tags:

access:  protected

Type:   string


[ Top ]

$elementtype =

[line 79]

Variable that contains type of the xHTML element



Tags:

access:  protected

Type:   string


[ Top ]

$elementvalue =

[line 84]

Variable that contains element value



Tags:

access:  protected

Type:   string


[ Top ]

$formaction =

[line 64]

Variable that contains action to be done when submitting form



Tags:

access:  protected

Type:   string


[ Top ]

$formenctype =  "application/x-www-form-urlencoded"

[line 74]

Variable that contains encryption type to use when submitting form



Tags:

access:  protected

Type:   string


[ Top ]

$formmethod =  "post"

[line 69]

Variable that contains method to use when submitting form



Tags:

access:  protected

Type:   string


[ Top ]

$forvalue =

[line 89]

Variable that contains for value



Tags:

access:  protected

Type:   string


[ Top ]

$html_needclose =  true

[line 49]

Variable that contains switch defining if tag needs to be closed



Tags:

access:  protected

Type:   bool


[ Top ]

$html_output =  null

[line 100]

Variable that contains html output



Tags:

access:  public

Type:   string


[ Top ]

$html_tag =

[line 44]

Variable that contains tag



Tags:

access:  protected

Type:   string


[ Top ]

$style =

[line 54]

Variable that contains style parameter



Tags:

access:  protected

Type:   string


[ Top ]

$tag_opened =  false

[line 95]

Variable that contains switch defining if tag has been opened



Tags:

access:  protected

Type:   bool


[ Top ]



Class Methods


method HTMLCloseTag [line 260]

string HTMLCloseTag( string $tag)

HTML closing tag function

This function is used to close xHTML tags. Result is stored in $this->html_output (added to the end of the string) and returned.

  1.  <?php
  2.  $oHTML            new HTML();
  3.  echo $oHTML->HTMLCloseTag("p");
  4.  // </p>
  5.  ?>




Tags:



Parameters:

string   $tag   xHTML tag to be opened (required)

[ Top ]

method HTMLOpenTag [line 144]

string HTMLOpenTag( string $tag, [string $name = null], [string $id = null], [string $value = null], [string $class = null], [string $style = null], [array $aScript = null], [bool $needclose = true], [string $action = null], [string $method = null], [string $enctype = null], [string $elementtype = null], [string $forvalue = null], [int $rows = null], [int $cols = null], [bool $bSelected = false])

HTML opening tag function

This function is used to open xHTML tags. Result is stored in $this->html_output (added to the end of the string) and returned.

  1.  <?php
  2.  $aScript array("onfocus" => "go();");
  3.  $oHTML   new HTML();
  4.  echo $oHTML->HTMLOpenTag("p""passedclass""passedstyle"$aScript);
  5.  // <p class="passedclass" style="passedstyle" onfocus="go();">
  6.  ?>




Tags:



Parameters:

string   $tag   xHTML tag to be opened (required)
string   $name   xHTML name of the tag
string   $id   xHTML id of the tag
string   $value   xHTML value of the tag
string   $class   xHTML class parameter
string   $style   xHTML style parameter
array   $aScript   scripts to be added
bool   $needclose   switch defining if the tag needs to be closed
string   $action   xHTML action tag for forms
string   $method   xHTML method tag for forms
string   $enctype   xHTML encryption type for forms
string   $elementtype   xHTML type tag for input for example
string   $forvalue   xHTML for tag (label)
int   $rows   xHTML rows tag (textarea)
int   $cols   xHTML cols tag (textarea)
bool   $bSelected   xHTML selected tag (option)

[ Top ]


Documentation generated on Wed, 26 Aug 2009 12:30:18 +0200 by phpDocumentor 1.4.1