Microweber\Utils\Adapters\Cache\Storage\FileStorage::tags PHP Method

tags() public method

Tags for cache.
public tags ( $tags ) : object
return object
    public function tags($tags)
    {
        $string_array = array();
        if (is_string($tags)) {
            $string_array = explode(',', $tags);
        } elseif (is_array($tags)) {
            $string_array = $tags;
            array_walk($string_array, 'trim');
        }
        $this->tags = $string_array;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * Tags for cache.
  *
  * @param  string $string
  *
  * @return object
  */
 public function tags($tags)
 {
     return $this->adapter->tags($tags);
 }