protected function addIdentifierToTags(string $entryIdentifier, array $tags)
    {
        foreach ($tags as $tag) {
            // Update tag-to-identifier index
            $identifiers = $this->findIdentifiersByTag($tag);
            if (array_search($entryIdentifier, $identifiers) === false) {
                $identifiers[] = $entryIdentifier;
                $this->memcache->set($this->identifierPrefix . 'tag_' . $tag, $identifiers);
            }

            // Update identifier-to-tag index
            $existingTags = $this->findTagsByIdentifier($entryIdentifier);
            if (array_search($tag, $existingTags) === false) {
                $this->memcache->set($this->identifierPrefix . 'ident_' . $entryIdentifier, array_merge($existingTags, $tags));
            }
        }
    }
protected function addIdentifierToTags(string $entryIdentifier, array $tags)
    {
        foreach ($tags as $tag) {
            // Update tag-to-identifier index
            $identifiers = $this->findIdentifiersByTag($tag);
            if (array_search($entryIdentifier, $identifiers) === false) {
                $identifiers[] = $entryIdentifier;
                $this->memcache->set($this->identifierPrefix . 'tag_' . $tag, $identifiers);
            }

            // Update identifier-to-tag index
            $existingTags = $this->findTagsByIdentifier($entryIdentifier);
            if (array_search($tag, $existingTags) === false) {
                $this->memcache->set($this->identifierPrefix . 'ident_' . $entryIdentifier, array_merge($existingTags, $tags));
            }
        }
    }
protected function addIdentifierToTags ( string $ entryIdentifier , array $ tags ) { foreach ( $ tags as $ tag ) { // Update tag-to-identifier index $ identifiers = $ this -> findIdentifiersByTag ( $ tag ) ; if ( array_search ( $ entryIdentifier , $ identifiers ) === false ) { $ identifiers [ ] = $ entryIdentifier ; $ this -> memcache -> set ( $ this -> identifierPrefix . 'tag_' . $ tag , $ identifiers ) ; } // Update identifier-to-tag index $ existingTags = $ this -> findTagsByIdentifier ( $ entryIdentifier ) ; if ( array_search ( $ tag , $ existingTags ) === false ) { $ this -> memcache -> set ( $ this -> identifierPrefix . 'ident_' . $ entryIdentifier , array_merge ( $ existingTags , $ tags ) ) ; } } }
Associates the identifier with the given tags

@param string $entryIdentifier
@param array $tags
@return void
Associates the identifier with the given tags