Class JDocumentHTML

Description

DocumentHTML class, provides an easy interface to parse and display an html document

Located in /document/document/html.php (line 23)

patTemplate
   |
   --JTemplate
      |
      --JDocument
         |
         --JDocumentHTML
Variable Summary
 string $_base
 string $_custom
 array $_links
 array $_metaTags
Method Summary
 JDocumentHTML __construct ([array $attributes = array()], string $type)
 void addCustomTag (string $html)
 void addFavicon (string $href, [string $type = 'image/x-icon'], [string $relation = 'shortcut icon'])
 void addHeadLink (string $href, string $relation, [string $relType = 'rel'], [mixed $attribs = array()], array $attributes)
 string fetchHead ()
 string getBase ()
 void parse (string $template, [string $filename = 'index.php'], [string $directory = 'templates'])
 void setBase (string $url)
 void setMetaData (string $name, string $content, [bool $http_equiv = false])
 void unsetMetaData (string $name, [bool $http_equiv = false])
Variables
string $_base = '' (line 31)

Contains the base url

  • access: private
string $_custom = array() (line 55)

Array of custom tags

  • access: private
array $_links = array() (line 47)

Array of Header <link> tags

  • access: private
array $_metaTags = array( 'standard' => array ( 'Generator' => 'Joomla! 1.1' )) (line 39)

Array of meta tags

  • access: private

Inherited Variables

Inherited from JDocument

JDocument::$_charset
JDocument::$_language
JDocument::$_lineEnd
JDocument::$_mime
JDocument::$_namespace
JDocument::$_profile
JDocument::$_renderers
JDocument::$_script
JDocument::$_scripts
JDocument::$_style
JDocument::$_styleSheets
JDocument::$_tab
JDocument::$_title
Methods
Constructor __construct (line 64)

Class constructore

  • access: protected
JDocumentHTML __construct ([array $attributes = array()], string $type)
  • string $type: (either html or tex)
  • array $attributes: Associative array of attributes

Redefinition of:
JDocument::__construct()
Class constructor
addCustomTag (line 129)

Adds a custom html string to the head block

  • access: public
void addCustomTag (string $html)
  • string $html: The html to add to the head
addFavicon (line 116)

Adds a shortcut icon (favicon)

This adds a link to the icon shown in the favorites list or on the left of the url in the address bar. Some browsers display it on the tab, as well.

  • access: public
void addFavicon (string $href, [string $type = 'image/x-icon'], [string $relation = 'shortcut icon'])
  • string $href: The link that is being related.
  • string $type: File type
  • string $relation: Relation of link
addHeadLink (line 97)

Adds <link> tags to the head of the document

$relType defaults to 'rel' as it is the most common relation type used. ('rev' refers to reverse relation, 'rel' indicates normal, forward relation.) Typical tag: <link href="index.php" rel="Start">

  • access: public
void addHeadLink (string $href, string $relation, [string $relType = 'rel'], [mixed $attribs = array()], array $attributes)
  • string $href: The link that is being related.
  • string $relation: Relation of link.
  • string $relType: Relation type attribute. Either rel or rev (default: 'rel').
  • array $attributes: Associative array of remaining attributes.
fetchHead (line 213)

Generates the head html and return the results as a string

  • access: public
string fetchHead ()

Redefinition of:
JDocument::fetchHead()
Return the document head
getBase (line 152)

Returns the document base url

  • access: public
string getBase ()
parse (line 320)

Parse a document template

  • access: public
void parse (string $template, [string $filename = 'index.php'], [string $directory = 'templates'])
  • string $template: The template to look for the file
  • string $filename: The actual filename
  • string $directory: The directory to look for the template

Redefinition of:
JDocument::parse()
Parse a file and create an internal patTemplate object
setBase (line 141)

Sets the document base tag

  • access: public
void setBase (string $url)
  • string $url: The url used in the base tag
setMetaContentType (line 202)

Sets an http-equiv Content-Type meta tag

  • access: public
void setMetaContentType ()
setMetaData (line 166)

Sets or alters a meta tag.

  • access: public
void setMetaData (string $name, string $content, [bool $http_equiv = false])
  • string $name: Value of name or http-equiv tag
  • string $content: Value of the content tag
  • bool $http_equiv: META type "http-equiv" defaults to null
unsetMetaData (line 187)

Unsets a meta tag.

  • access: public
void unsetMetaData (string $name, [bool $http_equiv = false])
  • string $name: Value of name or http-equiv tag
  • bool $http_equiv: META type "http-equiv" defaults to null

Inherited Methods

Inherited From JDocument

 JDocument::__construct()
 JDocument::addScript()
 JDocument::addScriptDeclaration()
 JDocument::addStyleDeclaration()
 JDocument::addStyleSheet()
 JDocument::display()
 JDocument::execRenderer()
 JDocument::fetchBody()
 JDocument::fetchHead()
 JDocument::getCharset()
 JDocument::getInstance()
 JDocument::getLang()
 JDocument::getTitle()
 JDocument::parse()
 JDocument::setCharset()
 JDocument::setLang()
 JDocument::setLineEnd()
 JDocument::setMimeEncoding()
 JDocument::setTab()
 JDocument::setTitle()
 JDocument::_addRenderer()
 JDocument::_getLineEnd()
 JDocument::_getTab()
 JDocument::_load()

Inherited From JTemplate

 JTemplate::JTemplate()
 JTemplate::__construct()
 JTemplate::display()
 JTemplate::fetch()
 JTemplate::getInstance()
 JTemplate::parse()
 JTemplate::setTemplateCachePrefix()
 JTemplate::__destruct()

Documentation generated on Sat, 4 Feb 2006 14:23:46 +0100 by phpDocumentor 1.3.0RC4