public function getDoctypeFromConfig($config)
    {
        // recommended test
        $doctype = $config->get('HTML.Doctype');
        if (!empty($doctype)) {
            return $doctype;
        }
        $doctype = $config->get('HTML.CustomDoctype');
        if (!empty($doctype)) {
            return $doctype;
        }
        // backwards-compatibility
        if ($config->get('HTML.XHTML')) {
            $doctype = 'XHTML 1.0';
        } else {
            $doctype = 'HTML 4.01';
        }
        if ($config->get('HTML.Strict')) {
            $doctype .= ' Strict';
        } else {
            $doctype .= ' Transitional';
        }
        return $doctype;
    }
public function getDoctypeFromConfig($config)
    {
        // recommended test
        $doctype = $config->get('HTML.Doctype');
        if (!empty($doctype)) {
            return $doctype;
        }
        $doctype = $config->get('HTML.CustomDoctype');
        if (!empty($doctype)) {
            return $doctype;
        }
        // backwards-compatibility
        if ($config->get('HTML.XHTML')) {
            $doctype = 'XHTML 1.0';
        } else {
            $doctype = 'HTML 4.01';
        }
        if ($config->get('HTML.Strict')) {
            $doctype .= ' Strict';
        } else {
            $doctype .= ' Transitional';
        }
        return $doctype;
    }
public function getDoctypeFromConfig ( $ config ) { // recommended test $ doctype = $ config -> get ( 'HTML.Doctype' ) ; if ( ! empty ( $ doctype ) ) { return $ doctype ; } $ doctype = $ config -> get ( 'HTML.CustomDoctype' ) ; if ( ! empty ( $ doctype ) ) { return $ doctype ; } // backwards-compatibility if ( $ config -> get ( 'HTML.XHTML' ) ) { $ doctype = 'XHTML 1.0' ; } else { $ doctype = 'HTML 4.01' ; } if ( $ config -> get ( 'HTML.Strict' ) ) { $ doctype .= ' Strict' ; } else { $ doctype .= ' Transitional' ; } return $ doctype ; }
Retrieves the doctype from the configuration object
@param HTMLPurifier_Config $config
@return string
Retrieves the doctype from the configuration object