public function setTarget($target)
    {
        if (Format::isIdentifier($target)) {
            $this->target = $target;
        } else {
            $msg = "'${target}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setTarget($target)
    {
        if (Format::isIdentifier($target)) {
            $this->target = $target;
        } else {
            $msg = "'${target}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
public function setTarget ( $ target ) { if ( Format :: isIdentifier ( $ target ) ) { $ this -> target = $ target ; } else { $ msg = "'${target}' is not a valid QTI identifier." ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the target variable identifier.

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