Sets the tagsAllowed option

@param  array|string $tagsAllowed
@return self Provides a fluent interface
487090
public function setTagsAllowed($tagsAllowed)
    {
        if (!is_array($tagsAllowed)) {
            $tagsAllowed = [$tagsAllowed];
        }

        foreach ($tagsAllowed as $index => $element) {
            // If the tag was provided without attributes
            if (is_int($index) && is_string($element)) {
                // Canonicalize the tag name
                $tagName = strtolower($element);
                // Store the tag as allowed with no attributes
                $this->tagsAllowed[$tagName] = [];
            } elseif (is_string($index) && (is_array($element) || is_string($element))) {
                // Otherwise, if a tag was provided with attributes
                // Canonicalize the tag name
                $tagName = strtolower($index);
                // Canonicalize the attributes
                if (is_string($element)) {
                    $element = [$element];
                }
                // Store the tag as allowed with the provided attributes
                $this->tagsAllowed[$tagName] = [];
                foreach ($element as $attribute) {
                    if (is_string($attribute)) {
                        // Canonicalize the attribute name
                        $attributeName = strtolower($attribute);
                        $this->tagsAllowed[$tagName][$attributeName] = null;
                    }
                }
            }
        }

        return $this;
    }
307733
public function setTagOptions($tag, array $options) 
    {
        $this->tagOptions[$tag] = $options; 
        $this->keyTagParamsComposite = null;
    }
213757
public function closeTag($tag = null)
    {
        if ($tag === null) {
            $tag = $this->tag;
        }

        $this->append(sprintf('</%s>', $tag));
        return $this;
    }
369660
public function setTag(array $tag)
    {
        $this->validateInput(
            $tag,
            $this->validator,
            'validateTag',
            $this->exception,
            'Provided tag array is not a valid value.'
        );

        foreach ($tag as $tagName) {
            self::$xml['tag'] .= '<video:tag>'.$tagName.'</video:tag>';
        }

        return $this;
    }
878983
public function restrictTLD($tld) {
        if ( ! is_array($tld)) {
            $tld = [$tld];
        }

        $this->getRoutesMatcher()->getRestrictionsMatcher()
            ->setTLDs($tld);

        return $this;
    }
1030941
public function withTags($tags) {
        if (is_null($this->tags)) {
            $this->tags = [];
        }

        foreach ($tags as $tag) {
            array_push($this->tags, $tags);
        }

        return $this;
    }
576015
public function setTosUris(array $tosUris = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$tosUris', $tosUris, __NAMESPACE__ . '\TaggedValue');

        $this->tosUris = $tosUris;

        return $this;
    }
580652
public function setDescriptions(array $descriptions = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$descriptions', $descriptions, __NAMESPACE__ . '\TaggedValue');

        $this->descriptions = $descriptions;

        return $this;
    }
655303
protected function setTagsContext()
    {
        $objectManager = Bootstrap::$staticObjectManager;
        $environment = $objectManager->get(Environment::class);

        $tags = [
            'php_version' => phpversion(),
            'flow_context' => (string)$environment->getContext(),
            'flow_version' => FLOW_VERSION_BRANCH
        ];

        $this->client->tags_context($tags);
    }
154709
public function setTagsAttribute($tags)
    {
        if (! $this->exists) {
            $this->queuedTags = $tags;

            return;
        }

        $this->tag($tags);
    }
936535
public function setAllowedHosts($allowedHosts)
    {
        if (is_string($allowedHosts)) {
            $allowedHosts = preg_split('/ *, */', $allowedHosts);
        }
        $this->allowedHosts = $allowedHosts;
        return $this;
    }
943974
public function setAllowedExtensions($extensions)
    {
        if (is_string($extensions)) {
            $extensions = explode(',', $extensions);
        }

        $this->allowedExtensions = array_map('trim', $extensions);

        return $this;
    }
799601
public function limitTypes($allowed) {
		// if allowed is an array
		if(is_array($allowed)) {
			// push the whole table
			$this->Limits->Types = $allowed;
		}
		// allowed is a string
		else {
			// push it
			$this->Limits->Types[] = $allowed;
		}
		// return self
		return($this);
	}
632333
public function detachTags($tags = null)
    {
        ! $tags || $tags = $this->parseTags($tags);

        $this->tags()->detach($tags);

        return $this;
    }
897239
public function setAllowed(array $allowed){
        $this->allowed  = array_unique(
            array_map(
                "strtoupper",
                array_filter(
                    $allowed,
                    "is_string"
                )
            )
        );

        if(empty($this->allowed)){
            $this->allowed  = null;
        }

        return $this;
    }
975678
public function set(array $tags)
    {
        if (!empty($tags)) {
            foreach ($tags as $_tag) {
                $this->add($_tag);
            }
        }
        return $this;
    }
963089
public function setAllowedMimeTypes($types = '*')
        {
            if(is_string($types))
            {
                if ('*' !== $types) {
                    $types = (array) $types;
                }else{
                    $this->allowedTypes = $types;
                    return $this;
                }
            }

            if(is_array($types))
            {
                $this->allowedTypes = $types;
                return $this;
            }else{
                return false;
            }
        }