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

Class: HTML_Common

Source Location: /HTML_Common-1.2.2/Common.php

Class Overview


Base class for all HTML classes


Author(s):

Version:

  • 1.7

Methods


Inherited Variables

Inherited Methods


Class Details

[line 39]
Base class for all HTML classes


[ Top ]


Method Detail

HTML_Common (Constructor)   [line 86]

HTML_Common HTML_Common( [mixed $attributes = null], [int $tabOffset = 0])

Class constructor
  • Access: public

Parameters:

mixed   $attributes   —  Associative array of table tag attributes or HTML attributes name="value" pairs
int   $tabOffset   —  Indent offset in tabs

[ Top ]

apiVersion   [line 97]

double apiVersion( )

Returns the current API version
  • Access: public

[ Top ]

display   [line 422]

void display( )

Displays the HTML to the screen
  • Access: public

[ Top ]

getAttribute   [line 259]

void getAttribute( string $attr)

Returns the value of the given attribute
  • Since: 1.5
  • Throws:
  • Access: public

Parameters:

string   $attr   —  Attribute name

[ Top ]

getAttributes   [line 286]

mixed getAttributes( [bool $asString = false])

Returns the assoc array (default) or string of attributes
  • Return: attributes
  • Since: 1.6
  • Access: public

Parameters:

bool   $asString   —  Whether to return the attributes as string

[ Top ]

getComment   [line 400]

string getComment( )

Returns the HTML comment
  • Since: 1.5
  • Access: public

[ Top ]

getTabOffset   [line 362]

int getTabOffset( )

Returns the tabOffset
  • Since: 1.5
  • Access: public

[ Top ]

removeAttribute   [line 314]

void removeAttribute( string $attr)

Removes an attribute
  • Since: 1.4
  • Throws:
  • Access: public

Parameters:

string   $attr   —  Attribute name

[ Top ]

setAttributes   [line 273]

void setAttributes( mixed $attributes)

Sets the HTML attributes
  • Access: public

Parameters:

mixed   $attributes   —  Either a typical HTML attribute string or an associative array

[ Top ]

setComment   [line 388]

void setComment( string $comment)

Sets the HTML comment to be displayed at the beginning of the HTML string
  • Since: 1.4
  • Access: public

Parameters:

string   $comment   — 

[ Top ]

setLineEnd   [line 327]

void setLineEnd( string $style)

Sets the line end style to Windows, Mac, Unix or a custom string.
  • Since: 1.7
  • Access: public

Parameters:

string   $style   —  "win", "mac", "unix" or custom string.

[ Top ]

setTab   [line 375]

void setTab( string $string)

Sets the string used to indent HTML
  • Since: 1.7
  • Access: public

Parameters:

string   $string   —  String used to indent ("\11", "\t", ' ', etc.).

[ Top ]

setTabOffset   [line 350]

void setTabOffset( int $offset)

Sets the tab offset
  • Access: public

Parameters:

int   $offset   — 

[ Top ]

toHtml   [line 412]

string toHtml( )

Abstract method. Must be extended to return the objects HTML
  • Abstract:
  • Access: public

[ Top ]

updateAttributes   [line 300]

void updateAttributes( mixed $attributes)

Updates the passed attributes without changing the other existing attributes
  • Access: public

Parameters:

mixed   $attributes   —  Either a typical HTML attribute string or an associative array

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:15:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.