Class Doctype

Summary

Fully Qualified Name: Zend\View\Helper\Doctype
Extends: AbstractHelper

Description

Helper for setting and retrieving the doctype

Methods

Name Description Defined By
__construct() Constructor Doctype
__invoke() Set or retrieve doctype Doctype
__toString() String representation of doctype Doctype
getDoctype() Retrieve doctype Doctype
getDoctypes() Get doctype => string mappings Doctype
getView() Get the view object AbstractHelper
isHtml5() Is doctype HTML5? (HeadMeta uses this for validation) Doctype
isRdfa() Is doctype RDFa? Doctype
isXhtml() Is doctype XHTML? Doctype
setDoctype() Set doctype Doctype
setView() Set the View object AbstractHelper
unsetDoctypeRegistry() Unset the static doctype registry Doctype

Method Details

__construct()

Constructor

Map constants to doctype strings, and set default doctype

Returns:

__invoke()

Set or retrieve doctype

Parameter Name Type Description
$doctype string

Returns: \Doctype

__toString()

String representation of doctype

Returns: string

getDoctype()

Retrieve doctype

Returns: string

getDoctypes()

Get doctype => string mappings

Returns: array

getView()

Get the view object

Returns: null|\Renderer

isHtml5()

Is doctype HTML5? (HeadMeta uses this for validation)

Returns: bool

isRdfa()

Is doctype RDFa?

Returns: bool

isXhtml()

Is doctype XHTML?

Returns: bool

setDoctype()

Set doctype

Parameter Name Type Description
$doctype string

Returns: \Doctype

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

unsetDoctypeRegistry()

Unset the static doctype registry

Mainly useful for testing purposes. Sets {@link $registeredDoctypes} to a null value.

Returns: void

Top