This class can be used to generate a tag cloud from a list of words.
It builds a list of words from an associative array with multiple words that is passed to the class constructor. It may also add individual words later.
Each word is associated to a weight. The weight defines the relative size of the words in the tag cloud.
The class may shuffle the words to make the tag cloud return the words in a random order.
The class may return the tag cloud as an HTML string with the words rendered with CSS styles associated to each size, or as an array of words and associated sizes so the words can be rendered in a customized way by the application. |