Zend\View\Helper\Doctype
Helper for setting and retrieving the doctype
Synopsis
class Doctype
extends AbstractHelper
{
- // constants
- const XHTML11 = 'XHTML11';
- const XHTML1_STRICT = 'XHTML1_STRICT';
- const XHTML1_TRANSITIONAL = 'XHTML1_TRANSITIONAL';
- const XHTML1_FRAMESET = 'XHTML1_FRAMESET';
- const XHTML1_RDFA = 'XHTML1_RDFA';
- const XHTML1_RDFA11 = 'XHTML1_RDFA11';
- const XHTML_BASIC1 = 'XHTML_BASIC1';
- const XHTML5 = 'XHTML5';
- const HTML4_STRICT = 'HTML4_STRICT';
- const HTML4_LOOSE = 'HTML4_LOOSE';
- const HTML4_FRAMESET = 'HTML4_FRAMESET';
- const HTML5 = 'HTML5';
- const CUSTOM_XHTML = 'CUSTOM_XHTML';
- const CUSTOM = 'CUSTOM';
- // members
- protected string $defaultDoctype;
- protected ArrayObject $registry;
- protected ArrayObject $registeredDoctypes;
- // Inherited members from AbstractHelper
- protected RendererInterface $view;
- // methods
- public void __construct()
- public Doctype __invoke()
- public string __toString()
- protected static void registerDefaultDoctypes()
- public static void unsetDoctypeRegistry()
- public Doctype setDoctype()
- public string getDoctype()
- public array getDoctypes()
- public bool isXhtml()
- public bool isHtml5()
- public bool isRdfa()
- // Inherited methods from AbstractHelper
- public AbstractHelper setView()
- public null|Renderer getView()
Hierarchy
Extends
Constants
Name | Value |
---|---|
XHTML11 | 'XHTML11' |
XHTML1_STRICT | 'XHTML1_STRICT' |
XHTML1_TRANSITIONAL | 'XHTML1_TRANSITIONAL' |
XHTML1_FRAMESET | 'XHTML1_FRAMESET' |
XHTML1_RDFA | 'XHTML1_RDFA' |
XHTML1_RDFA11 | 'XHTML1_RDFA11' |
XHTML_BASIC1 | 'XHTML_BASIC1' |
XHTML5 | 'XHTML5' |
HTML4_STRICT | 'HTML4_STRICT' |
HTML4_LOOSE | 'HTML4_LOOSE' |
HTML4_FRAMESET | 'HTML4_FRAMESET' |
HTML5 | 'HTML5' |
CUSTOM_XHTML | 'CUSTOM_XHTML' |
CUSTOM | 'CUSTOM' |
Members
protected
- $defaultDoctype
—
string
Default DocType - $registeredDoctypes — ArrayObject
- $registry
—
ArrayObject
Registry containing current doctype and mappings - $view
—
Zend\View\Renderer\RendererInterface
View object instance
Methods
protected
- registerDefaultDoctypes() — Register the default doctypes we understand
public
- __construct() — Constructor
- __invoke() — Set or retrieve doctype
- __toString() — String representation of doctype
- getDoctype() — Retrieve doctype
- getDoctypes() — Get doctype => string mappings
- isHtml5() — Is doctype HTML5? (HeadMeta uses this for validation)
- isRdfa() — Is doctype RDFa?
- isXhtml() — Is doctype XHTML?
- setDoctype() — Set doctype
- unsetDoctypeRegistry() — Unset the static doctype registry