Helper for setting and retrieving the doctype

package Default
inherited_from \Zend\View\Helper\AbstractHelper

 Methods

Constructor

__construct() 

Map constants to doctype strings, and set default doctype

Set or retrieve doctype

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

Parameters

$doctype

string

Exceptions

\Zend\View\Exception\DomainException

Returns

\Zend\View\Helper\Doctype

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\HelperInterface::getView()

Returns

null\Zend\View\Renderer\RendererInterface

Is doctype HTML5? (HeadMeta uses this for validation)

isHtml5() : boolean

Returns

boolean

Is doctype RDFa?

isRdfa() : boolean

Returns

boolean

Is doctype XHTML?

isXhtml() : boolean

Returns

boolean

Set doctype

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

Parameters

$doctype

string

Returns

\Zend\View\Helper\Doctype

Set the View object

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

Parameters

$view

\Zend\View\Renderer\RendererInterface

Returns

\Zend\View\Helper\AbstractHelper

Unset the static doctype registry

unsetDoctypeRegistry() : void
Static

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

Register the default doctypes we understand

registerDefaultDoctypes() : void
Static

 Properties

 

Default DocType

$defaultDoctype : string

Default

self::HTML4_LOOSE
 

Shared doctypes to use throughout all instances

$registeredDoctypes : \ArrayObject

Default

Static
 

Registry containing current doctype and mappings

$registry : \ArrayObject

Default

 

View object instance

$view : \Zend\View\Renderer\RendererInterface

Default

null

 Constants

 

CUSTOM

CUSTOM = 'CUSTOM' 
 

CUSTOM_XHTML

CUSTOM_XHTML = 'CUSTOM_XHTML' 
 

HTML4_FRAMESET

HTML4_FRAMESET = 'HTML4_FRAMESET' 
 

HTML4_LOOSE

HTML4_LOOSE = 'HTML4_LOOSE' 
 

HTML4_STRICT

HTML4_STRICT = 'HTML4_STRICT' 
 

HTML5

HTML5 = 'HTML5' 
 

XHTML11

XHTML11 = 'XHTML11' 
 

XHTML1_FRAMESET

XHTML1_FRAMESET = 'XHTML1_FRAMESET' 
 

XHTML1_RDFA

XHTML1_RDFA = 'XHTML1_RDFA' 
 

XHTML1_RDFA11

XHTML1_RDFA11 = 'XHTML1_RDFA11' 
 

XHTML1_STRICT

XHTML1_STRICT = 'XHTML1_STRICT' 
 

XHTML1_TRANSITIONAL

XHTML1_TRANSITIONAL = 'XHTML1_TRANSITIONAL' 
 

XHTML5

XHTML5 = 'XHTML5' 
 

XHTML_BASIC1

XHTML_BASIC1 = 'XHTML_BASIC1'