references:joomla.framework:document:jdocument-getinstanceTable of Contents
getInstance
This function returns an object that is of a type that is dependent on the document type. The default document type is html. Currently this is the only type that has been implemented. This method must be invoked as: $document = &JDocument::getInstance(); Syntaxjdocument &getInstance ( $type, $attributes )
ExamplesThis function is called from the JApplication::getDocument function and should not need to be called otherwise. This function is called in the following way: Example $attributes = array ( 'charset' => 'utf-8', 'lineend' => 'unix', 'tab' => ' ', 'language' => 'en-GB' ); jimport('joomla.document.document'); $instance =& JDocument::getInstance('html', $attributes); This results in an object of type JDocumentHTML being assigned to the $instance variable. |


