public static function create(string $name): TagKey
    {
        if (strlen($name) == 0 || strlen($name) > self::MAX_LENGTH || !self::isPrintable($name)) {
            throw new \Exception("Invalid TagKey name: ". $name);
        }
        return new self($name);
    }
public static function create(string $name): TagKey
    {
        if (strlen($name) == 0 || strlen($name) > self::MAX_LENGTH || !self::isPrintable($name)) {
            throw new \Exception("Invalid TagKey name: ". $name);
        }
        return new self($name);
    }
public static function create ( string $ name ) : TagKey { if ( strlen ( $ name ) == 0 || strlen ( $ name ) > self :: MAX_LENGTH || ! self :: isPrintable ( $ name ) ) { throw new \ Exception ( "Invalid TagKey name: " . $ name ) ; } return new self ( $ name ) ; }
Constructs a TagKey with the given name.

The name must meet the following requirements:
<ol>
<li>It cannot be empty
<li>It cannot be longer than TagKey::MAX_LENGTH
<li>It can only contain printable ASCII characters.
</ol>

@param string $name the name of the key
@return TagKey
@throws \Exception if name is not valid.
Constructs a TagKey with the given name .