hpolthof/tagcloud
Larablocks Analysis
hpolthof/tagcloud works with Laravel 5 (latest release v4.0.2, Jul 7, 2015), which reached end of life: no more fixes, even for security.
Recommendation checks
Not advisedNot advised: no release or commit in over 2 years.
- No release or commit in over 2 years
- Supports only Laravel 5, past end of life
- No release in the last 12 months (last: Jul 7, 2015)
- 0 downloads a month (needs 10,000)
- 4 GitHub stars (needs 100)
State
Likely abandoned- No release or commit in over 2 years.
- Last stable release: Jul 7, 2015.
- No releases in the last 12 months.
- First released: Jul 7, 2015.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.
| Install | |
|---|---|
composer require hpolthof/tagcloud |
|
| Latest Version: | v4.0.2 |
| PHP: | >=5.4.0 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Jul 7, 2015 |
| Links: | GitHub · Packagist |
tagcloud
PHP Tag Cloud composer package Implementation of http://lotsofcode.github.io/tag-cloud/
PHP Tag Cloud
v4.0
Installation
Use composer
composer require hpolthof/tagcloud
Basic usage
$cloud = new TagCloud();
$cloud->addTag("tag-cloud");
$cloud->addTag("programming");
echo $cloud->render();
Convert a string
$cloud->addString("This is a tag-cloud script, written by Del Harvey. I wrote this tag-cloud class because I just love writing code.");
Adding multiple tags
$cloud->addTags(array('tag-cloud','php','github'));
Removing a tag
$cloud->setRemoveTag('github');
Removing multiple tags
$cloud->setRemoveTags(array('del','harvey'));
More complex adding
$cloud->addTag(array('tag' => 'php', 'url' => 'http://www.php.net', 'colour' => 1));
$cloud->addTag(array('tag' => 'ajax', 'url' => 'http://www.php.net', 'colour' => 2));
$cloud->addTag(array('tag' => 'css', 'url' => 'http://www.php.net', 'colour' => 3));
Set the minimum length required
$cloud->setMinLength(3);
Limiting the output
$cloud->setLimit(10);
Set the order
$cloud->setOrder('colour','DESC');
Set a custom HTML output
$cloud->setHtmlizeTagFunction( function($tag, $size) {
$link = '<a href="'.$tag['url'].'">'.$tag['tag'].'</a>';
return "<span class='tag size{$size} colour-{$tag['colour']}'>{$link}</span> ";
});
Outputting the cloud (shown above)
echo $cloud->render();
More usages on in a prettier format can be found here: http://lotsofcode.github.com/tag-cloud
Tests
To run the unit test suite:
cd tests
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit lotsofcode/TagCloud/TagCloud.php
Submitting pull requests
Indentation style, size and encoding should be followed as per .editorconfig settings.
Related Packages
A PSR-6 cache implementation using Illuminate. This implementation supports tags
A package to manage and generate string with tokens/shortcodes for Eloquent Mode...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v4.0.2 | >=5.4.0 | ~5 | MIT |