abstract class NamespacedTagSet extends TagSet

Base for tag sets whose tags namespace the item keyspace.

Items are stored under keys derived from the tag set and must be read back through the same tags.

Properties

protected Store $store

The cache store implementation.

from  TagSet
protected array $names

The tag names.

from  TagSet

Methods

__construct(Store $store, array $names = [])

Create a new TagSet instance.

from  TagSet
bool
reset()

Reset all tags in the set.

from  TagSet
bool
flush()

Flush all the tags in the set.

from  TagSet
bool
attemptEach(iterable $items, Closure $operation)

Attempt an operation for every item.

from  TagSet
array
getNames()

Get all of the tag names in the set.

from  TagSet
string
getNamespace()

Get a unique namespace that changes when any of the tags are flushed.

array
tagIds()

Get an array of tag identifiers for all of the tags in the set.

string
tagId(string $name)

Get the unique tag identifier for a given tag.

string
tagKey(string $name)

Get the tag identifier key for a given tag.

Details

in TagSet at line 27
__construct(Store $store, array $names = [])

Create a new TagSet instance.

Parameters

Store $store
array $names

in TagSet at line 36
abstract bool reset()

Reset all tags in the set.

Return Value

bool

in TagSet at line 41
abstract bool flush()

Flush all the tags in the set.

Return Value

bool

in TagSet at line 51
protected bool attemptEach(iterable $items, Closure $operation)

Attempt an operation for every item.

Parameters

iterable $items
Closure $operation

Return Value

bool

in TagSet at line 78
array getNames()

Get all of the tag names in the set.

Return Value

array

at line 18
string getNamespace()

Get a unique namespace that changes when any of the tags are flushed.

Return Value

string

at line 28
array tagIds()

Get an array of tag identifiers for all of the tags in the set.

Return Value

array

at line 36
abstract string tagId(string $name)

Get the unique tag identifier for a given tag.

Parameters

string $name

Return Value

string

at line 41
abstract string tagKey(string $name)

Get the tag identifier key for a given tag.

Parameters

string $name

Return Value

string