Simple HTML decorator for tags

 Methods

Create a new decorator with options

__construct(array | \Traversable $options) 
Inherited

Allow passing options to the constructor.

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::__construct()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::__construct()

Parameters

$options

array\Traversable

Get class list

getClassList() : array

Returns

array

Get encoding

getEncoding() : string
Inherited

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::getEncoding()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::getEncoding()

Returns

string

Retrieve Escaper instance

getEscaper() : \Zend\Escaper\Escaper
Inherited

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

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::getEscaper()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::getEscaper()

Returns

Retrieve font size unit

getFontSizeUnit() : string

Returns

string

Get HTML tags map

getHTMLTags() : array

Returns

array

Retrieve maximum font size

getMaxFontSize() : int

Returns

int

Retrieve minimum font size

getMinFontSize() : int

Returns

int

Defined by Tag

render(\Zend\Tag\ItemList $tags) : array

Set a list of classes to use instead of fontsizes

setClassList(array $classList) : \Zend\Tag\Cloud\Decorator\HTMLTag

Parameters

$classList

array

Exceptions

\Zend\Tag\Cloud\Decorator\Exception\InvalidArgumentException When the classlist is empty
\Zend\Tag\Cloud\Decorator\Exception\InvalidArgumentException When the classlist contains an invalid classname

Returns

\Zend\Tag\Cloud\Decorator\HTMLTag

Set encoding

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

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::setEncoding()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::setEncoding()

Parameters

$value

string

Returns

\Zend\Tag\Cloud\Decorator\HTMLCloud

Set Escaper instance

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

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::setEscaper()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::setEscaper()

Parameters

Returns

Set the font size unit

setFontSizeUnit(string $fontSizeUnit) : \Zend\Tag\Cloud\Decorator\HTMLTag

Possible values are: em, ex, px, in, cm, mm, pt, pc and %

Parameters

$fontSizeUnit

string

Exceptions

\Zend\Tag\Cloud\Decorator\Exception\InvalidArgumentException When an invalid fontsize unit is specified

Returns

\Zend\Tag\Cloud\Decorator\HTMLTag

Set the HTML tags surrounding the <a> element

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

Parameters

$htmlTags

array

Returns

\Zend\Tag\Cloud\Decorator\HTMLTag

Set maximum font size

setMaxFontSize(int $maxFontSize) : \Zend\Tag\Cloud\Decorator\HTMLTag

Parameters

$maxFontSize

int

Exceptions

\Zend\Tag\Cloud\Decorator\Exception\InvalidArgumentException When fontsize is not numeric

Returns

\Zend\Tag\Cloud\Decorator\HTMLTag

Set minimum font size

setMinFontSize(int $minFontSize) : \Zend\Tag\Cloud\Decorator\HTMLTag

Parameters

$minFontSize

int

Exceptions

\Zend\Tag\Cloud\Decorator\Exception\InvalidArgumentException When fontsize is not numeric

Returns

\Zend\Tag\Cloud\Decorator\HTMLTag

Set options from array

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

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::setOptions()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::setOptions()

Parameters

$options

array

Configuration for the decorator

Returns

Validate an HTML attribute name

validateAttributeName(string $name) 
Inherited

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::validateAttributeName()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::validateAttributeName()

Parameters

$name

string

Exceptions

\Zend\Tag\Exception\InvalidAttributeNameException

Validate an HTML element name

validateElementName(string $name) 
Inherited

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::validateElementName()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::validateElementName()

Parameters

$name

string

Exceptions

\Zend\Tag\Exception\InvalidElementNameException

Wrap html with tag

wrapTag(string $html) : string
Inherited

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::wrapTag()
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::wrapTag()

Parameters

$html

string

Returns

string

 Properties

 

Allowed fontsize units

$allowedFontSizeUnits : array

 

List of tags which get assigned to the inner element instead of font-sizes.

$classList : array

 

<p>Encoding to use</p>

$encoding : string
Inherited

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::$$encoding
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::$$encoding
 

$escaper

$escaper : \Zend\Escaper\Escaper
Inherited

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::$$escaper
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::$$escaper
 

Unit for the fontsize

$fontSizeUnit : string

 

List of HTML tags

$htmlTags : array

 

Maximum fontsize

$maxFontSize : int

 

Minimum fontsize

$minFontSize : int

 

Option keys to skip when calling setOptions()

$skipOptions : array
Inherited

inherited_from \Zend\Tag\Cloud\Decorator\AbstractDecorator::$$skipOptions
inherited_from \Zend\Tag\Cloud\Decorator\AbstractTag::$$skipOptions