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

Class: HTMLhs

Source Location: /HTMLhs.php

Class Overview

Strings
   |
   --HTML
      |
      --HTMLhs

This class manages HTMLhs objects. This class creates xHTML Hx titles.


Author(s):

Version:

  • 1.2

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML

HTML::HTMLCloseTag()
HTML closing tag function
HTML::HTMLOpenTag()
HTML opening tag function

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 32]
This class manages HTMLhs objects. This class creates xHTML Hx titles.

Created on 28 apr 09

Changes: 1.1 -> 1.2: 21 jul 09 added: file is PEAR compatible 1.0 -> 1.1: 06 may 09 added: to HTML package




Tags:

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


[ Top ]


Class Variables

$html_needclose =  true

[line 43]

Variable that contains switch defining if tag needs to be closed



Tags:

access:  protected

Type:   bool
Overrides:   Array


[ Top ]

$html_tag =  "h"

[line 38]

Variable that contains tag



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]



Class Methods


method HTMLHClose [line 144]

string HTMLHClose( int $level, string $this->html_tag)

HTML closing Hx tag function

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

  1.  <?php
  2.  $oHTML_H            new HTMLhs();
  3.  echo $oHTML_H->HTMLHClose(2);
  4.  // </h2>
  5.  ?>




Tags:

return:  xHTML string corresponding to closed tag
since:  version 1.0
usedby:  HTMLhs::HTMLHConstruct()
uses:  HTML::HTMLCloseTag()


Parameters:

string   $this->html_tag   xHTML tag to be opened
int   $level   level of the title

[ Top ]

method HTMLHConstruct [line 201]

string HTMLHConstruct( [string $sTitleContent = null], [int $level = 1], [string $name = null], [string $id = null], [string $class = null], [string $style = null], [array $aScript = null])

HTML Hx construction function

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

  1.  <?php
  2.  $oH    new HTMLhs();
  3.  echo $oH->HTMLHConstruct(
  4.       $sTitleContent,
  5.       1,
  6.       "hName",
  7.       "hID",
  8.       "hClass",
  9.       "hStyle",
  10.       array(
  11.           "onclick"   =>  "click();"
  12.       )
  13.  );
  14.  // <h1 name="hName" id="hID" class="hClass" style="hStyle"
  15.  onclick="click();">...</h1>
  16.  ?>




Tags:

return:  xHTML string corresponding to HTML result
since:  version 1.0
uses:  HTMLhs::HTMLHOpen()
uses:  HTMLhs::HTMLHClose()


Parameters:

string   $sTitleContent   div content
int   $level   title level
string   $name   xHTML name tag
string   $id   xHTML id tag
string   $class   xHTML class tag
string   $style   xHTML style tag
array   $aScript   array containing scripts data

[ Top ]

method HTMLHOpen [line 89]

string HTMLHOpen( int $level, [string $name = null], [string $id = null], [string $class = null], [string $style = null], [array $aScript = null], string $this->html_tag, bool $this->html_needclose)

xHTML Hx opening tag function

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

  1.  <?php
  2.  $aScript array("onclick" => "go();");
  3.  $oH      new HTMLhs();
  4.  echo $oH->HTMLHOpen(
  5.       1,
  6.       "fooName",
  7.       "barID",
  8.       "myClass",
  9.       "myStyle",
  10.       $aScript
  11.  );
  12.  // <h1 name="fooName" id="barID" class="myClass" style="myStyle"
  13.  onclick="go();">
  14.  ?>




Tags:

return:  xHTML string corresponding to opened tag
since:  version 1.0
usedby:  HTMLhs::HTMLHConstruct()
uses:  HTML::HTMLOpenTag()


Parameters:

string   $this->html_tag   xHTML tag to be opened
int   $level   level of the title (needs to be between 1 and 9) (required)
string   $name   xHTML name of the tag
string   $id   xHTML id of the tag
string   $class   xHTML class parameter
string   $style   xHTML style parameter
array   $aScript   scripts to be added
bool   $this->html_needclose   switch defining if the tag needs to be closed

[ Top ]


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