Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

Abstract Class JDocument

Description

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

Located in /joomla/document/document.php (line 27)

Class JObject   (Subpackage Base)

Abstract class JDocument   (Subpackage Document)
Direct descendents
Class Description
ClassJDocumentHTML DocumentHTML class, provides an easy interface to parse and display an html document
ClassJDocumentRAW DocumentRAW class, provides an easy interface to parse and display raw output
ClassJDocumentError DocumentError class, provides an easy interface to parse and display an error page
ClassJDocumentFeed DocumentFeed class, provides an easy interface to parse and display any feed document
ClassJDocumentPDF DocumentPDF class, provides an easy interface to parse and display a pdf document
Variable Summary
Variable string $description
Variable string $direction
Variable string $language
Variable string $link
Variable string $title
Variable string $_generator
Method Summary
Constructor JDocument __construct ([array $options = array()])
Method void addScript (string $url, [string $type = "text/javascript"])
Method void addScriptDeclaration (string $content, [string $type = 'text/javascript'])
Method void addStyleDeclaration (string $content, [string $type = 'text/css'])
Method void addStyleSheet (string $url, [string $type = 'text/css'], [string $media = null], [ $attribs = array()])
Method The getBuffer ()
Method string getCharset ()
Method string getDescription ()
Method string getDirection ()
Method string getGenerator ()
Method array getHeadData ()
Method object The &getInstance ([type $type = 'html'], [ $attributes = array()])
Method string getLanguage ()
Method string getLink ()
Method string getMetaData (string $name, [bool $http_equiv = false])
Method string getModifiedDate ()
Method string getTitle ()
Method string getType ()
Method object loadRenderer (string $type)
Method The render ([boolean $cache = false], [array $params = array()], boolean $compress)
Method void setBuffer (string $content)
Method void setCharset ([string $type = 'utf-8'])
Method void setDescription ( $description, string $title)
Method void setDirection ([ $dir = "ltr"], string $lang)
Method void setGenerator (string $generator)
Method void setHeadData (array $data)
Method void setLanguage ([string $lang = "en"])
Method void setLineEnd (string $style)
Method void setLink (string $url)
Method void setMetaData (string $name, string $content, [bool $http_equiv = false])
Method void setMimeEncoding ([string $type = 'text/html'])
Method void setModifiedDate (string $date)
Method void setTab (string $string)
Method void setTitle (string $title)
Variables
string $description = '' (line 43)

Document description

  • access: public
string $direction = 'ltr' (line 67)

Contains the document direction setting

  • access: public
string $language = 'en' (line 59)

Contains the document language setting

  • access: public
string $link = '' (line 51)

Document base URL

  • access: public
string $title = '' (line 35)

Document title

  • access: public
string $_generator = 'Joomla! 1.5 - Open Source Content Management' (line 75)

Document generator

  • access: public
Methods
Constructor __construct (line 204)

Class constructor

  • access: protected
JDocument __construct ([array $options = array()])
  • array $options: Associative array of options

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.

Redefined in descendants as:
addScript (line 357)

Adds a linked script to the page

  • access: public
void addScript (string $url, [string $type = "text/javascript"])
  • string $url: URL to the linked script
  • string $type: Type of script. Defaults to 'text/javascript'
addScriptDeclaration (line 369)

Adds a script to the page

  • access: public
void addScriptDeclaration (string $content, [string $type = 'text/javascript'])
  • string $content: Script
  • string $type: Scripting mime (defaults to 'text/javascript')
addStyleDeclaration (line 396)

Adds a stylesheet declaration to the page

  • access: public
void addStyleDeclaration (string $content, [string $type = 'text/css'])
  • string $content: Style declarations
  • string $type: Type of stylesheet (defaults to 'text/css')
addStyleSheet (line 381)

Adds a linked stylesheet to the page

  • access: public
void addStyleSheet (string $url, [string $type = 'text/css'], [string $media = null], [ $attribs = array()])
  • string $url: URL to the linked style sheet
  • string $type: Mime encoding type
  • string $media: Media type that this stylesheet applies to
  • $attribs
getBuffer (line 299)

Get the contents of the document buffer

  • return: contents of the document buffer
  • access: public
The getBuffer ()

Redefined in descendants as:
getCharset (line 417)

Returns the document charset encoding.

  • access: public
string getCharset ()
getDescription (line 497)

Return the title of the page.

  • access: public
string getDescription ()
getDirection (line 457)

Returns the document language.

  • access: public
string getDirection ()
getGenerator (line 539)

Returns the document generator

  • access: public
string getGenerator ()
getHeadData (line 279)

Get the document head data

  • return: The document head data in array form
  • access: public
array getHeadData ()

Redefined in descendants as:
getInstance (line 244)

Returns a reference to the global JDocument object, only creating it if it doesn't already exist.

This method must be invoked as:

  $document = &JDocument::getInstance();

  • return: document object.
  • access: public
object The &getInstance ([type $type = 'html'], [ $attributes = array()])
  • type $type: The document type to instantiate
  • $attributes
getLanguage (line 437)

Returns the document language.

  • access: public
string getLanguage ()
getLink (line 518)

Returns the document base url

  • access: public
string getLink ()
getMetaData (line 321)

Gets a meta tag.

  • access: public
string getMetaData (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
getModifiedDate (line 560)

Returns the document modified date

  • access: public
string getModifiedDate ()
getTitle (line 477)

Return the title of the document.

  • access: public
string getTitle ()
getType (line 269)

Returns the document type

  • access: public
string getType ()
loadRenderer (line 644)

Load a renderer

  • since: 1.5
  • access: public
object loadRenderer (string $type)
  • string $type: The renderer type
render (line 679)

Outputs the document

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

Redefined in descendants as:
setBuffer (line 309)

Set the contents of the document buffer

  • access: public
void setBuffer (string $content)
  • string $content: The content to be set in the buffer

Redefined in descendants as:
setCharset (line 407)

Sets the document charset

  • access: public
void setCharset ([string $type = 'utf-8'])
  • string $type: Charset encoding string
setDescription (line 487)

Sets the description of the document

  • access: public
void setDescription ( $description, string $title)
  • string $title
  • $description
setDirection (line 447)

Sets the global document direction declaration. Default is left-to-right (ltr).

  • access: public
void setDirection ([ $dir = "ltr"], string $lang)
  • string $lang
  • $dir
setGenerator (line 529)

Sets the document generator

  • access: public
void setGenerator (string $generator)
  • string $generator
setHeadData (line 289)

Set the document head data

  • access: public
void setHeadData (array $data)
  • array $data: The document head data in array form

Redefined in descendants as:
setLanguage (line 427)

Sets the global document language declaration. Default is English (en).

  • access: public
void setLanguage ([string $lang = "en"])
  • string $lang
setLineEnd (line 588)

Sets the line end style to Windows, Mac, Unix or a custom string.

  • access: public
void setLineEnd (string $style)
  • string $style: "win", "mac", "unix" or custom string.
setLink (line 508)

Sets the document link

  • access: public
void setLink (string $url)
  • string $url: A url
setMetaData (line 341)

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
setMimeEncoding (line 577)

Sets the document MIME encoding that is sent to the browser.

This usually will be text/html because most browsers cannot yet accept the proper mime settings for XHTML: application/xhtml+xml and to a lesser extent application/xml and text/xml. See the W3C note (http://www.w3.org/TR/xhtml-media-types/) for more details.

  • access: public
void setMimeEncoding ([string $type = 'text/html'])
  • string $type
setModifiedDate (line 550)

Sets the document modified date

  • access: public
void setModifiedDate (string $date)
  • string $date
setTab (line 622)

Sets the string used to indent HTML

  • access: public
void setTab (string $string)
  • string $string: String used to indent ("\11", "\t", ' ', etc.).
setTitle (line 467)

Sets the title of the document

  • access: public
void setTitle (string $title)
  • string $title

Inherited Methods

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getPublicProperties()
 JObject::set()
 JObject::toString()

Documentation generated on Mon, 05 Mar 2007 20:56:47 +0000 by phpDocumentor 1.3.1