public function Tag::setName in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php \phpDocumentor\Reflection\DocBlock\Tag::setName()
Sets the name of this tag.
Parameters
string $name The new name of this tag.:
Return value
$this
Throws
\InvalidArgumentException When an invalid tag name is provided.
File
- vendor/
phpdocumentor/ reflection-docblock/ src/ phpDocumentor/ Reflection/ DocBlock/ Tag.php, line 223
Class
- Tag
- Parses a tag definition for a DocBlock.
Namespace
phpDocumentor\Reflection\DocBlockCode
public function setName($name) {
if (!preg_match('/^' . self::REGEX_TAGNAME . '$/u', $name)) {
throw new \InvalidArgumentException('Invalid tag name supplied: ' . $name);
}
$this->tag = $name;
return $this;
}