Bluz\Cache\Cache::getTagAdapter PHP Method

getTagAdapter() public method

Get underlying tag adapter
public getTagAdapter ( ) : Bluz\Cache\CacheInterface
return Bluz\Cache\CacheInterface
    public function getTagAdapter()
    {
        if (is_null($this->tagAdapter)) {
            // create instance of new adapter
            if ($tagAdapter = $this->getOption('tagAdapter')) {
                $this->tagAdapter = $this->initAdapter($tagAdapter);
            } elseif ($adapter = $this->getAdapter()) {
                $this->tagAdapter = $adapter;
            } else {
                throw new ConfigurationException("Tag Adapter can't initialize. Configuration is missed");
            }
        }
        return $this->tagAdapter;
    }