ZF-10732: Zend_Tag_Cloud needs an example on how to use the decorator

Description

After the 'HTML Tag decorator' paragraph, there should be an example demonstrating how to use the decorator. The line in the opening ("an array containing the string 'decorator' and optionally an array 'options'") is ambiguous, and can easily confuse people.

Suggested example:

<?php $cloud = new Zend_Cloud(array($tags)); //These tags can be copied from the 1st example, if needed for verbosity $cloud->setDecorator(array('decorator'=>'HtmlTag', 'options'=>array('minFontSize'=>65, 'maxFontSize'=>150, 'fontSizeUnit'=>'%'))); ?>

Optionally, an additional example can be provided showing how to set the decorator in the constructor.

Also, I believe it should be mentioned that only one Decorator is shipped with ZF, which is called 'HtmlTag' (this isn't mentioned at the moment at all). Additional decorators can of course be created by the developer.

Comments

No comments to display