Helper for setting and retrieving the doctype

 Methods

Constructor

__construct() 

Map constants to doctype strings, and set default doctype

Set or retrieve doctype

__invoke(string $doctype) : \Zend\View\Helper\Doctype

Parameters

$doctype

string

Exceptions

\Zend\View\Exception\DomainException

Returns

String representation of doctype

__toString() : string

Returns

string

Retrieve doctype

getDoctype() : string

Returns

string

Get doctype => string mappings

getDoctypes() : array

Returns

array

Get the view object

getView() : null | \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::getView()

Returns

Is doctype HTML5? (HeadMeta uses this for validation)

isHtml5() : bool

Returns

bool

Is doctype RDFa?

isRdfa() : bool

Returns

bool

Is doctype XHTML?

isXhtml() : bool

Returns

bool

Set doctype

setDoctype(string $doctype) : \Zend\View\Helper\Doctype

Parameters

$doctype

string

Returns

Set the View object

setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::setView()

Parameters

Returns

Unset the static doctype registry

unsetDoctypeRegistry() : void

Mainly useful for testing purposes. Sets $registeredDoctypes to a null value.

Register the default doctypes we understand

registerDefaultDoctypes() : void

 Properties

 

Default DocType

$defaultDoctype : string

 

<p>Shared doctypes to use throughout all instances</p>

$registeredDoctypes : \ArrayObject

 

Registry containing current doctype and mappings

$registry : \ArrayObject

 

View object instance

$view : \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::$$view

 Constants

 

CUSTOM

CUSTOM 

 

CUSTOM_XHTML

CUSTOM_XHTML 

 

HTML4_FRAMESET

HTML4_FRAMESET 

 

HTML4_LOOSE

HTML4_LOOSE 

 

HTML4_STRICT

HTML4_STRICT 

 

HTML5

HTML5 

 

XHTML11

XHTML11 

 

XHTML1_FRAMESET

XHTML1_FRAMESET 

 

XHTML1_RDFA

XHTML1_RDFA 

 

XHTML1_RDFA11

XHTML1_RDFA11 

 

XHTML1_STRICT

XHTML1_STRICT 

 

XHTML1_TRANSITIONAL

XHTML1_TRANSITIONAL 

 

XHTML5

XHTML5 

 

XHTML_BASIC1

XHTML_BASIC1