Begin executing a new tags operation.

@param  array|mixed  $names
@return \Illuminate\Cache\TaggedCache
511171
public function tags($names)
    {
        $names = is_array($names) ? $names : func_get_args();

        /*
         * Now we are able to flush only tagged cache items
         */
        if (! empty($names)) {
            $this->setSubDirectory($this->tagsSubDir($names));
        }

        return new Repository($this, new TagSet($this, $names));
    }
770985
public function tag($tags)
    {
        $tags = array_slice((array)$tags, 0, 3);
        foreach ($tags as $tag) {
            $this->messageBuilder->addTag($tag);
        }

        return $this;
    }
62701
protected function setTags($key, array $tags = [])
    {
        if (empty($tags)) {
            return;
        }

        foreach ($this->prepareTags($tags) as $tag) {
            if (($keys = $this->storage->get($tag)) !== false) {
                $keys = $this->unserialize($keys);
                if (in_array($key, $keys, true)) {
                    continue;
                }
                $keys[] = $key;
                $this->setInternal($tag, $this->serialize($keys), 0);
                continue;
            }
            $this->setInternal($tag, $this->serialize((array)$key), 0);
        }
    }
1093739
public function openTag($name, $attributes=null) {
        if ($attributes) {
          $initial = $name;
          $name = self::open($initial);
          $name .= self::getAttributesCollection($attributes);
          $name .= ">";

          return $name;
        } 

      return self::fullOpen($name);
    }
87036
public function tag($ids, $tags)
    {
        $namespace = $this->getNamespace() . '/tag';

        return $this->ontraport->put($namespace, $this->toArray([
            'ids' => implode(',', (array) $ids),
            'add_list' => implode(',', (array) $tags),
        ]));
    }
1321660
public function flushCache($cacheTags = null)
    {
        $cache = $this->getCacheDriver();

        if ( ! method_exists($cache, 'tags')) {
            return false;
        }

        $cacheTags = $cacheTags ?: $this->cacheTags;

        $cache->tags($cacheTags)->flush();

        return true;
    }
1132575
public function getTag(string $name)
    {
        $tagFinderOutput = $this->caller
            ->execute(TagCommand::getInstance()->listTags())
            ->getOutputLines(true);

        foreach ($tagFinderOutput as $line) {
            if ($line === $name) {
                return new Tag($this, $name);
            }
        }

        return null;
    }
848768
public function cache($id = null, $tags = [])
    {
        $this->_shouldCache = $id === false ? false : true;
        $this->_cacheId = is_string($id) ? $id : $this->_cacheId;
        $this->_cacheTags = $tags ? (array) $tags : $this->_cacheTags;

        return $this;
    }
468334
public function create($device, array $tagNames = array()){
        if (!empty($tagNames)){
            $tagEndpoint = new Tags($this->client);
            $tags = $tagEndpoint->findAll($tagNames);
            if(!empty($tags['notFound'])){
                foreach($tags['notFound'] as $name){
                    $tags['tags'][] = $tagEndpoint->create($name);
                }
            }

            $formattedTags = $tagEndpoint->format($tags['tags'], 'other');
            $device['tags'] = $formattedTags['tags'];
        }

        $device = $this->makeJsonReady($device);
        return $this->post('inventory/devices/', $device);
    }
99011
public static function addTags(array $tags)
    {
        if (count($tags) === 0)
            return;

        $found = Tag::whereIn('tag', $tags)->pluck('tag')->all();

        foreach (array_diff($tags, $found) as $tag) {
            if (empty(trim($tag)) || strlen($tag) < 3)
                continue;

            try {
                $model = new Tag;
                $model->tag = trim($tag);
                $model->save();
            } catch (\Illuminate\Database\QueryException $e) {
                $context = [];
                $context['file'] = $e->getFile() ?: '';
                $context['line'] = $e->getLine() ?: '';
                $context['code'] = $e->getCode() ?: '';

                logger()->warning($e->getMessage(), $context);
            }
        }
    }
30468
public function with($names)
    {
        $newChain = func_num_args() > 1 ? func_get_args() : $names;
        return $this->forkChain()->setNativeChain($this->buildChain($newChain));
    }
943209
public function start(array $tags=[])
    {
        if ($this->isExists()) {
            throw new TimerExistException('Another Timer is allready started.');
        }

        $key = microtime();
        $this->getTimers()->start($key, $tags);
        $this->setKey($key);

        return $this;
    }
1007616
public function purgeByTag($tags)
    {
        if (is_string($tags)) {
            $tags = [$tags];
        }

        // initialize log
        $log = new DebugLog();
        $log->addMessage('State', 'Purge by cache tag');

        // get caches from index storage
        $cacheKeys = $this->indexStorage->selectByTags($tags);
        if (!is_array($cacheKeys)) {
            return false;
        }

        foreach ($cacheKeys as $ck) {
            // purge from cache storage
            $this->cacheStorage->purge($ck);
        }

        // purge the index storage
        $this->indexStorage->deleteEntryByTags($tags);

        return true;
    }
663030
public function tag($tags)
    {
        foreach ($this->prepareTags($tags) as $tag) {
            $this->addTag($tag);
        }

        return true;
    }
258936
protected function cache()
    {
        if ($this->supportsTags === null) {
            $this->determineTagSupport();
        }

        if ($this->supportsTags) {
            return $this->cache->tags($this->tag);
        }

        return $this->cache;
    }
144190
public function merge(RouteTags $tags): self
    {
        $mergedTags = array_unique(array_merge($this->tags, $tags->tags));
        return new static($mergedTags);
    }
1284007
public function addTags($tags = array())
	{
		if (!is_array($tags)) {
			$tags = func_get_args();
		}
		foreach ($tags as $tagAttributes) {
			$this->addTag($tagAttributes);
		}
	}