protected function setIdentifier($identifier)
    {
        if (Utils::isValidVariableIdentifier($identifier)) {
            $this->identifier = $identifier;
        } else {
            $msg = "The identifier '${identifier}' is not a valid QTI Variable Name Identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
protected function setIdentifier($identifier)
    {
        if (Utils::isValidVariableIdentifier($identifier)) {
            $this->identifier = $identifier;
        } else {
            $msg = "The identifier '${identifier}' is not a valid QTI Variable Name Identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
protected function setIdentifier ( $ identifier ) { if ( Utils :: isValidVariableIdentifier ( $ identifier ) ) { $ this -> identifier = $ identifier ; } else { $ msg = "The identifier '${identifier}' is not a valid QTI Variable Name Identifier." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the identifier string.

@param string $identifier A prefixed identifier.
@throws \InvalidArgumentException If $identifier is not a valid prefixed identifier.
Set the identifier string .