Class JDocumentHTML

Description

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

  • since: 11.1

Located in /libraries/joomla/document/html/html.php (line 22)

JObject
   |
   --JDocument
      |
      --JDocumentHTML
Variable Summary
string $baseurl
array $params
string $template
integer $_caching
array $_custom
array $_file
array $_links
string $_template
Method Summary
JDocumentHTML __construct ([array $options = array()])
JDocumentHTML addCustomTag (string $html)
JDocumentHTML addFavicon (string $href, [string $type = 'image/vnd.microsoft.icon'], [string $relation = 'shortcut icon'])
JDocumentHTML addHeadLink (string $href, string $relation, [string $relType = 'rel'], [array $attribs = array()])
integer countMenuChildren ()
integer countModules (string $condition)
The getBuffer ([string $type = null], [string $name = null], [array $attribs = array()])
array getHeadData ()
JDocumentHTML mergeHeadData (array $data)
JDocumentHTML parse ([array $params = array()])
The render ([boolean $caching = false], [array $params = array()])
JDocumentHTML setBuffer (string $content, [array $options = array()])
JDocumentHTML setHeadData (array $data)
JDocumentHTML _fetchTemplate ([array $params = array()])
string _loadTemplate (string $directory, string $filename)
string _renderTemplate ()
Variables
string $baseurl = null (line 54)

Base url

  • since: 11.1
  • access: public
array $params = null (line 62)

Array of template parameters

  • since: 11.1
  • access: public
string $template = null (line 46)

Name of the template

  • since: 11.1
  • access: public
integer $_caching = null (line 94)

Integer with caching setting

  • since: 11.1
  • access: protected
array $_custom = array() (line 38)

Array of custom tags

  • since: 11.1
  • access: public
array $_file = null (line 70)

File name

  • since: 11.1
  • access: public
array $_links = array() (line 30)

Array of Header <link> tags

  • since: 11.1
  • access: public
string $_template = '' (line 78)

String holding parsed template

  • since: 11.1
  • access: protected
array $_template_tags = array() (line 86)

Array of parsed template JDoc tags

  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JDocument

JDocument::$base
JDocument::$description
JDocument::$direction
JDocument::$instances
JDocument::$language
JDocument::$link
JDocument::$title
JDocument::$_buffer
JDocument::$_charset
JDocument::$_engine
JDocument::$_generator
JDocument::$_lineEnd
JDocument::$_mdate
JDocument::$_metaTags
JDocument::$_mime
JDocument::$_namespace
JDocument::$_profile
JDocument::$_script
JDocument::$_scripts
JDocument::$_style
JDocument::$_styleSheets
JDocument::$_tab
JDocument::$_type

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 103)

Class constructor

  • since: 11.1
  • access: public
JDocumentHTML __construct ([array $options = array()])
  • array $options: Associative array of options

Redefinition of:
JDocument::__construct()
Class constructor.
addCustomTag (line 301)

Adds a custom HTML string to the head block

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML addCustomTag (string $html)
  • string $html: The HTML to add to the head
addFavicon (line 284)

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.

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML addFavicon (string $href, [string $type = 'image/vnd.microsoft.icon'], [string $relation = 'shortcut icon'])
  • string $href: The link that is being related.
  • string $type: File type
  • string $relation: Relation of link
addHeadLink (line 260)

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

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML addHeadLink (string $href, string $relation, [string $relType = 'rel'], [array $attribs = array()])
  • 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 $attribs: Associative array of remaining attributes.
countMenuChildren (line 479)

Count the number of child menu items

  • return: Number of child menu items
  • since: 11.1
  • access: public
integer countMenuChildren ()
countModules (line 454)

Count the modules based on the given condition

  • return: Number of modules found
  • since: 11.1
  • access: public
integer countModules (string $condition)
  • string $condition: The condition to use
getBuffer (line 319)

Get the contents of a document include

  • return: output of the renderer
  • since: 11.1
  • access: public
The getBuffer ([string $type = null], [string $name = null], [array $attribs = array()])
  • string $type: The type of renderer
  • string $name: The name of the element to render
  • array $attribs: Associative array of remaining attributes.

Redefinition of:
JDocument::getBuffer()
Get the contents of the document buffer
getHeadData (line 121)

Get the HTML document head data

  • return: The document head data in array form
  • since: 11.1
  • access: public
array getHeadData ()
mergeHeadData (line 176)

Merge the HTML document head data

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML mergeHeadData (array $data)
  • array $data: The document head data in array form
parse (line 412)

Parses the template and populates the buffer

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML parse ([array $params = array()])
  • array $params: Parameters for fetching the template

Redefinition of:
JDocument::parse()
Parses the document and prepares the buffers
render (line 427)

Outputs the template to the browser.

  • return: rendered data
  • since: 11.1
  • access: public
The render ([boolean $caching = false], [array $params = array()])
  • boolean $caching: If true, cache the output
  • array $params: Associative array of attributes

Redefinition of:
JDocument::render()
Outputs the document
setBuffer (line 387)

Set the contents a document includes

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML setBuffer (string $content, [array $options = array()])
  • string $content: The content to be set in the buffer.
  • array $options: Array of optional elements.

Redefinition of:
JDocument::setBuffer()
Set the contents of the document buffer
setHeadData (line 146)

Set the HTML document head data

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: public
JDocumentHTML setHeadData (array $data)
  • array $data: The document head data in array form
_fetchTemplate (line 563)

Fetch the template, and initialise the params

  • return: instance of $this to allow chaining
  • since: 11.1
  • access: protected
JDocumentHTML _fetchTemplate ([array $params = array()])
  • array $params: Parameters to determine the template
_loadTemplate (line 517)

Load a template file

  • return: The contents of the template
  • since: 11.1
  • access: protected
string _loadTemplate (string $directory, string $filename)
  • string $directory: The name of the template
  • string $filename: The actual filename
_parseTemplate (line 605)

Parse a document template

  • return: parsed contents of the template
  • since: 11.1
  • access: protected
The _parseTemplate ()
_renderTemplate (line 647)

Render pre-parsed template

  • return: rendered template
  • since: 11.1
  • access: protected
string _renderTemplate ()

Inherited Methods

Inherited From JDocument

JDocument::__construct()
JDocument::addScript()
JDocument::addScriptDeclaration()
JDocument::addStyleDeclaration()
JDocument::addStyleSheet()
JDocument::getBase()
JDocument::getBuffer()
JDocument::getCharset()
JDocument::getDescription()
JDocument::getDirection()
JDocument::getGenerator()
JDocument::getInstance()
JDocument::getLanguage()
JDocument::getLink()
JDocument::getMetaData()
JDocument::getMimeEncoding()
JDocument::getModifiedDate()
JDocument::getTitle()
JDocument::getType()
JDocument::loadRenderer()
JDocument::parse()
JDocument::render()
JDocument::setBase()
JDocument::setBuffer()
JDocument::setCharset()
JDocument::setDescription()
JDocument::setDirection()
JDocument::setGenerator()
JDocument::setLanguage()
JDocument::setLineEnd()
JDocument::setLink()
JDocument::setMetaData()
JDocument::setMimeEncoding()
JDocument::setModifiedDate()
JDocument::setTab()
JDocument::setTitle()
JDocument::setType()
JDocument::_getLineEnd()
JDocument::_getTab()

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:55:36 -0500 by phpDocumentor 1.4.4