Simple HTML decorator for clouds

package Default
inherited_from \Zend\Tag\Cloud\Decorator\AbstractCloud

 Methods

Create a new decorator with options

__construct(array|\Traversable $options = null
Inherited

Allow passing options to the constructor.

inherited_from \Zend\Tag\Cloud\Decorator\DecoratorInterface::__construct()

Parameters

$options

array\Traversable

Get encoding

getEncoding() : string
Inherited

Returns

string

Retrieve Escaper instance

getEscaper() : \Zend\Escaper\Escaper
Inherited

If none registered, instantiates and registers one using current encoding.

Returns

\Zend\Escaper\Escaper

Retrieve HTML tag map

getHTMLTags() : array

Returns

array

Get tag separator

getSeparator() : string

Returns

string

Defined by Zend\Tag\Cloud\Decorator\Cloud

render(array $tags) : string

Parameters

$tags

array

Exceptions

\Zend\Tag\Cloud\Decorator\Exception\InvalidArgumentException

Returns

string

Set encoding

setEncoding($value) : \Zend\Tag\Cloud\Decorator\HTMLCloud
Inherited

Parameters

$value

Returns

\Zend\Tag\Cloud\Decorator\HTMLCloud

Set Escaper instance

setEscaper(\Zend\Escaper\Escaper $escaper) : \Zend\Tag\Cloud\Decorator\HtmlCloud
Inherited

Parameters

$escaper

\Zend\Escaper\Escaper

Returns

\Zend\Tag\Cloud\Decorator\HtmlCloud

Set the HTML tags surrounding all tags

setHTMLTags(array $htmlTags) : \Zend\Tag\Cloud\Decorator\HTMLCloud

Parameters

$htmlTags

array

Returns

\Zend\Tag\Cloud\Decorator\HTMLCloud

Set options from array

setOptions(array $options) : \Zend\Tag\Cloud\Decorator\AbstractTag
Inherited

Parameters

$options

array

Configuration for the decorator

Returns

\Zend\Tag\Cloud\Decorator\AbstractTag

Set the separator between the single tags

setSeparator($separator) : \Zend\Tag\Cloud\Decorator\HTMLCloud

Parameters

$separator

Returns

\Zend\Tag\Cloud\Decorator\HTMLCloud

Validate an HTML attribute name

validateAttributeName(string $name) 
Inherited

Parameters

$name

string

Exceptions

\Zend\Tag\Exception\InvalidAttributeNameException

Validate an HTML element name

validateElementName(string $name) 
Inherited

Parameters

$name

string

Exceptions

\Zend\Tag\Exception\InvalidElementNameException

Wrap html with tag

wrapTag(string $html) : string
Inherited

Parameters

$html

string

Returns

string

 Properties

 

Encoding to use

$encoding : string

Default

'UTF-8'
 

$escaper

$escaper : \Zend\Escaper\Escaper

Default

 

List of HTML tags

$htmlTags : array

Default

array('ul' => array('class' => 'zend-tag-cloud'))
 

Separator for the single tags

$separator : string

Default

' '
 

Option keys to skip when calling setOptions()

$skipOptions : array

Default

array('options', 'config')