Renders tag (both opening and closing) of a web page, to which some custom attributes can be added dynamically.

author Nikola Posa
package Default
inherited_from \Zend\View\Helper\AbstractHtmlElement

 Methods

Retrieve object instance; optionally add attributes.

__invoke(array $attribs = array()) : \Zend\View\Helper\HtmlTag
fluent This method is part of a fluent interface and will return the same instance

Parameters

$attribs

array

Returns

\Zend\View\Helper\HtmlTag

Render closing tag.

closeTag() : string

Returns

string

getAttributes()

getAttributes() : array

Returns

array

Get the tag closing bracket

getClosingBracket() : string
Inherited

Returns

string

getUseNamespaces()

getUseNamespaces() : boolean

Returns

boolean

Get the view object

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

Returns

null\Zend\View\Renderer\RendererInterface

Render opening tag.

openTag() : string

Returns

string

Set new attribute.

setAttribute(string $attrName, string $attrValue) : \Zend\View\Helper\HtmlTag
fluent This method is part of a fluent interface and will return the same instance

Parameters

$attrName

string

$attrValue

string

Returns

\Zend\View\Helper\HtmlTag

Add new or overwrite the existing attributes.

setAttributes(array $attribs) : \Zend\View\Helper\HtmlTag
fluent This method is part of a fluent interface and will return the same instance

Parameters

$attribs

array

Returns

\Zend\View\Helper\HtmlTag

setUseNamespaces()

setUseNamespaces(boolean $useNamespaces) : \Zend\View\Helper\HtmlTag
fluent This method is part of a fluent interface and will return the same instance

Parameters

$useNamespaces

boolean

Returns

\Zend\View\Helper\HtmlTag

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

handleNamespaceAttributes()

handleNamespaceAttributes() 

Converts an associative array to a string of tag attributes.

htmlAttribs(array $attribs) : string
Inherited
access public

Parameters

$attribs

array

From this array, each key-value pair is converted to an attribute name and value.

Returns

stringThe XHTML for the attributes.

Is doctype XHTML?

isXhtml() : boolean
Inherited

Returns

boolean

Normalize an ID

normalizeId(string $value) : string
Inherited

Parameters

$value

string

Returns

string

 Properties

 

Attributes for the <html> tag.

$attributes : array

Default

array()
 

The tag closing bracket

$closingBracket : string

Default

null
 

Whether to pre-set appropriate attributes in accordance with the currently set DOCTYPE.

$useNamespaces : boolean

Default

false
 

View object instance

$view : \Zend\View\Renderer\RendererInterface

Default

null
 

$handledNamespaces

$handledNamespaces : boolean

Default

false

 Constants

 

EOL character

EOL = PHP_EOL 
deprecated just use PHP_EOL