bankiru/stash-tags

Stash\Item with tags support

v1.0.1 2016-02-15 14:17 UTC

README

GitHub license Github All Releases Packagist Packagist Packagist Pre Release

Travis Coveralls Scrutinizer SensioLabs Insight HHVM

Install

composer require bankiru/stash-tags

Usage

$pool = new Pool();
$pool->setItemClass('Bankiru\Stash\TaggedItem');
$item = $pool->getItem('my-key');
$item->setTags(['tag1', 'tag2']);
$item->save();
$item = $pool->getItem('my-key');
$tags = $item->getTags();
echo 'Tags: ', implode(',', $tags);