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

Class: HTMLlabels

Source Location: /HTMLlabels.php

Class Overview

Strings
   |
   --HTML
      |
      --HTMLlabels

This class manages xHTML Labels objects.


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 xHTML Labels objects.

Created on 06 may 09

Changes: 1.1 -> 1.2: 21 jul 09 added: file is PEAR compatible 1.0 -> 1.1: 06 may 09 updated: Suppressed $name value (not valid xHTML 1.1 for labels)




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 =  "label"

[line 38]

Variable that contains tag



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]



Class Methods


method HTMLLabelClose [line 139]

string HTMLLabelClose( string $this->html_tag)

HTML closing Label tag function

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

  1.  <?php
  2.  $oHTMLlabels            new HTMLlabels();
  3.  echo $oHTMLlabels->HTMLLabelClose();
  4.  // </label>
  5.  ?>




Tags:

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


Parameters:

string   $this->html_tag   xHTML tag to be closed

[ Top ]

method HTMLLabelConstruct [line 194]

string HTMLLabelConstruct( [string $sLabelContent = null], [string $forvalue = null], [string $id = null], [string $class = null], [string $style = null], [array $aScript = null])

HTML Label construction function

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

  1.  <?php
  2.  $oHTMLlabels    new HTMLlabels();
  3.  echo $oHTMLlabels->HTMLLabelConstruct(
  4.       $sLabelContent,
  5.       "pName",
  6.       "linkedelement",
  7.       "pID",
  8.       "pClass",
  9.       "pStyle",
  10.       array(
  11.           "onclick"   =>  "click();"
  12.       )
  13.  );
  14.  // <label name="pName" id="pID" class="pClass" style="pStyle"
  15.  onclick="click();" for="linkedelement">...</label>
  16.  ?>




Tags:

return:  xHTML string corresponding to HTML result
since:  version 1.0
uses:  HTMLlabels::HTMLLabelOpen()
uses:  HTMLlabels::HTMLLabelClose()


Parameters:

string   $sLabelContent   paragraph content
string   $forvalue   xHTML for tag
string   $id   xHTML id tag
string   $class   xHTML class tag
string   $style   xHTML style tag
array   $aScript   array containing scripts data

[ Top ]

method HTMLLabelOpen [line 86]

string HTMLLabelOpen( [string $forvalue = null], [string $id = null], [string $class = null], [string $style = null], [array $aScript = null], string $this->html_tag, bool $this->html_needclose)

xHTML Labels opening tag function

This function is used to open xHTML labels 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.  $oHTMLlabels new HTMLlabels();
  4.  echo $oHTMLlabels->HTMLLabelOpen(
  5.       "fooName",
  6.       "linkedelement",
  7.       "barID",
  8.       "myClass",
  9.       "myStyle",
  10.       $aScript
  11.  );
  12.  // <label name="fooName" id="barID" class="myClass" style="myStyle"
  13.  onclick="go();" for="linkedelement">
  14.  ?>




Tags:

return:  xHTML string corresponding to opened tag
since:  Version 1.0
usedby:  HTMLlabels::HTMLLabelConstruct()
uses:  HTML::HTMLOpenTag()


Parameters:

string   $this->html_tag   xHTML tag to be opened
string   $forvalue   xHTML for 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:20 +0200 by phpDocumentor 1.4.1