API16

API16:JDocumentHTML/ construct

From Joomla! Documentation

Revision as of 22:44, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Class constructor <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Class constructor

[Edit Descripton]

Template:Description:JDocumentHTML/ construct

Syntax

__construct($options=array())
Parameter Name Default Value Description
$options array() $options Associative array of options

Defined in

libraries/joomla/document/html/html.php

Importing

jimport( 'joomla.document.html.html' );

Source Body

function __construct($options = array())
{
        parent::__construct($options);

        //set document type
        $this->_type = 'html';

        //set mime type
        $this->_mime = 'text/html';

        //set default document metadata
        $this->setMetaData('Content-Type', $this->_mime . '; charset=' . $this->_charset , true);
        $this->setMetaData('robots', 'index, follow');
}

[Edit See Also] Template:SeeAlso:JDocumentHTML/ construct

Examples

<CodeExamplesForm />