JDocument
Document class, provides an easy interface to parse and display a document
Located in /libraries/joomla/document/document.php (line 21)
JObject (Subpackage Object)
![]()
JDocument (Subpackage Document)
| Class | Description |
|---|---|
JDocumentError
|
DocumentError class, provides an easy interface to parse and display an error page |
JDocumentOpensearch
|
OpenSearch class, provides an easy interface to display an OpenSearch document |
JDocumentHTML
|
DocumentHTML class, provides an easy interface to parse and display a HTML document |
JDocumentXml
|
DocumentXML class, provides an easy interface to parse and display XML output |
JDocumentImage
|
DocumentImage class, provides an easy interface to output image data |
JDocumentFeed
|
DocumentFeed class, provides an easy interface to parse and display any feed document |
JDocumentRaw
|
DocumentRAW class, provides an easy interface to parse and display raw output |
JDocumentJSON
|
JDocumentJSON class, provides an easy interface to parse and display JSON output |
JDocument
addScript
(string $url, [string $type = "text/javascript"], [boolean $defer = false], [boolean $async = false])
JDocument
addStyleSheet
(string $url, [string $type = 'text/css'], [string $media = null], [array $attribs = array()])
string
$base
= '' (line 53)
Document base URL
string
$description
= '' (line 37)
Document description
string
$direction
= 'ltr' (line 69)
Contains the document direction setting
array
$instances
= array() (line 202)
string
$language
= 'en-gb' (line 61)
Contains the document language setting
string
$link
= '' (line 45)
Document full URL
string
$title
= '' (line 29)
Document title
mixed
$_buffer
= null (line 196)
Array of buffered output
string
$_charset
= 'utf-8' (line 108)
Contains the character encoding string
object
$_engine
= null (line 180)
The rendering engine
string
$_generator
= 'Joomla! - Open Source Content Management' (line 76)
Document generator
string
$_lineEnd
= "\12" (line 100)
Contains the line end string
string
$_mdate
= '' (line 84)
Document modified date
array
$_metaTags
= array() (line 172)
Array of meta tags
string
$_mime
= '' (line 116)
Document mime type
string
$_namespace
= '' (line 124)
Document namespace
string
$_profile
= '' (line 132)
Document profile
array
$_script
= array() (line 148)
Array of scripts placed in the header
array
$_scripts
= array() (line 140)
Array of linked scripts
array
$_style
= array() (line 164)
Array of included style declarations
array
$_styleSheets
= array() (line 156)
Array of linked style sheets
string
$_tab
= "\11" (line 92)
Tab string
string
$_type
= null (line 188)
The document type
Inherited Variables
Inherited from JObject
JObject::$_errors
Class constructor.
- array $options: Associative array of options
- JObject::__construct()
- Class constructor, overridden in descendant classes.
- JDocumentError::__construct() : Class constructor
- JDocumentOpensearch::__construct() : Class constructor
- JDocumentHTML::__construct() : Class constructor
- JDocumentXml::__construct() : Class constructor
- JDocumentImage::__construct() : Class constructor
- JDocumentFeed::__construct() : Class constructor
- JDocumentRaw::__construct() : Class constructor
- JDocumentJSON::__construct() : Class constructor
Adds a linked script to the page
- string $url: URL to the linked script
- string $type: Type of script. Defaults to 'text/javascript'
- boolean $defer: Adds the defer attribute.
- boolean $async: Adds the async attribute.
Adds a script to the page
- string $content: Script
- string $type: Scripting mime (defaults to 'text/javascript')
Adds a stylesheet declaration to the page
- string $content: Style declarations
- string $type: Type of stylesheet (defaults to 'text/css')
Adds a linked stylesheet to the page
- string $url: URL to the linked style sheet
- string $type: Mime encoding type
- string $media: Media type that this stylesheet applies to
- array $attribs: Array of attributes
Get the contents of the document buffer
- JDocumentHTML::getBuffer() : Get the contents of a document include
Returns the global JDocument object, only creating it if it doesn't already exist.
- string $type: The document type to instantiate
- array $attributes: Array of attributes
Gets a meta tag.
- string $name: Value of name or http-equiv tag
- boolean $httpEquiv: META type "http-equiv" defaults to null
Return the document MIME encoding that is sent to the browser.
Load a renderer
- string $type: The renderer type
Parses the document and prepares the buffers
- array $params: The array of parameters
- JDocumentHTML::parse() : Parses the template and populates the buffer
Outputs the document
- boolean $cache: If true, cache the output
- array $params: Associative array of attributes
- JDocumentError::render() : Render the document
- JDocumentOpensearch::render() : Render the document
- JDocumentHTML::render() : Outputs the template to the browser.
- JDocumentXml::render() : Render the document.
- JDocumentImage::render() : Render the document.
- JDocumentFeed::render() : Render the document
- JDocumentRaw::render() : Render the document.
- JDocumentJSON::render() : Render the document.
Sets the base URI of the document
- string $base: The base URI to be set
Set the contents of the document buffer
- string $content: The content to be set in the buffer.
- array $options: Array of optional elements.
- JDocumentHTML::setBuffer() : Set the contents a document includes
Sets the document charset
- string $type: Charset encoding string
Sets the description of the document
- string $description: The description to set
Sets the global document direction declaration. Default is left-to-right (ltr).
- string $dir: The language direction to be set
Sets the document generator
- string $generator: The generator to be set
Sets the global document language declaration. Default is English (en-gb).
- string $lang: The language to be set
Sets the line end style to Windows, Mac, Unix or a custom string.
- string $style: "win", "mac", "unix" or custom string.
Sets or alters a meta tag.
- string $name: Value of name or http-equiv tag
- string $content: Value of the content tag
- boolean $http_equiv: META type "http-equiv" defaults to null
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.
- string $type: The document type to be sent
- boolean $sync: Should the type be synced with HTML?
Sets the document modified date
- string $date: The date to be set
Sets the string used to indent HTML
- string $string: String used to indent ("\11", "\t", ' ', etc.).
Sets the title of the document
- string $title: The title to be set
Set the document type
- string $type: Type document is to set to
Inherited Methods
Inherited From JObject
JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::__toString()

static
static