public function setId($id = '')
    {
        if (is_string($id) && (empty($id) === true || Format::isIdentifier($id, false) === true)) {
            $this->id = $id;
        } else {
            $msg = "The 'id' argument of a body element must be a valid identifier or an empty string";
            throw new InvalidArgumentException($msg);
        }
    }
public function setId($id = '')
    {
        if (is_string($id) && (empty($id) === true || Format::isIdentifier($id, false) === true)) {
            $this->id = $id;
        } else {
            $msg = "The 'id' argument of a body element must be a valid identifier or an empty string";
            throw new InvalidArgumentException($msg);
        }
    }
public function setId ( $ id = '' ) { if ( is_string ( $ id ) && ( empty ( $ id ) === true || Format :: isIdentifier ( $ id , false ) === true ) ) { $ this -> id = $ id ; } else { $ msg = "The 'id' argument of a body element must be a valid identifier or an empty string" ; throw new InvalidArgumentException ( $ msg ) ; } }
Set the unique identifier of the body element.

@param string $id A QTI Identifier.
@throws \InvalidArgumentException If $id is not a valid QTI identifier.
Set the unique identifier of the body element .