| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Document |
JDocument |
__construct |
__construct() |
Never | Work in Progress |
This is the constructor for the class. It sets up the line end parameter, the character set, the language and the tab delimeter for the document if these parameters are passed. The constructor also sets up the name space and adds the module directories for the Function, OutputFilter and Renderer. The $type parameter is passed to the JTemplate constructor.
JDocument __construct ( $type, $attributes )
| $type | string | is a string specifying the type of the document (either HTML or TEX). |
| $attributes | array | Associative array of attributes. |
The recognized settings for $attributes are:
This class is instantiated by the JApplication::getDocument function. Therefore, another instantiation should not be necessary. This function executes the following code:
Example
$attributes = array ( 'charset' => 'utf-8', 'lineend' => 'unix', 'tab' => ' ', 'language' => 'en-GB' ); jimport('joomla.document.document'); $instance =& JDocument::getInstance('html', $attributes);