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

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