1<?php 2/** 3 * Zend Framework (http://framework.zend.com/) 4 * 5 * @link http://github.com/zendframework/zf2 for the canonical source repository 6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 7 * @license http://framework.zend.com/license/new-bsd New BSD License 8 */ 9 10namespace Zend\Cache\Storage; 11 12interface TaggableInterface 13{ 14 /** 15 * Set tags to an item by given key. 16 * An empty array will remove all tags. 17 * 18 * @param string $key 19 * @param string[] $tags 20 * @return bool 21 */ 22 public function setTags($key, array $tags); 23 24 /** 25 * Get tags of an item by given key 26 * 27 * @param string $key 28 * @return string[]|FALSE 29 */ 30 public function getTags($key); 31 32 /** 33 * Remove items matching given tags. 34 * 35 * If $disjunction only one of the given tags must match 36 * else all given tags must match. 37 * 38 * @param string[] $tags 39 * @param bool $disjunction 40 * @return bool 41 */ 42 public function clearByTags(array $tags, $disjunction = false); 43} 44