public function writeIntOrIdentifier($intOrIdentifier)
    {
        try {
            if (gettype($intOrIdentifier) === 'integer') {
                $this->writeBoolean(true);
                $this->writeInteger($intOrIdentifier);
            } elseif (gettype($intOrIdentifier) === 'string') {
                $this->writeBoolean(false);
                $this->writeString($intOrIdentifier);
            } else {
                $msg = "The intOrIdentifier value to be written must be an integer or a string, '" . gettype($intOrIdentifier) . "' given.";
                throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::INTORIDENTIFIER);
            }
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing an intOrIdentifier.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::INTORIDENTIFIER, $e);
        }
    }
public function writeIntOrIdentifier($intOrIdentifier)
    {
        try {
            if (gettype($intOrIdentifier) === 'integer') {
                $this->writeBoolean(true);
                $this->writeInteger($intOrIdentifier);
            } elseif (gettype($intOrIdentifier) === 'string') {
                $this->writeBoolean(false);
                $this->writeString($intOrIdentifier);
            } else {
                $msg = "The intOrIdentifier value to be written must be an integer or a string, '" . gettype($intOrIdentifier) . "' given.";
                throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::INTORIDENTIFIER);
            }
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while writing an intOrIdentifier.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::INTORIDENTIFIER, $e);
        }
    }
public function writeIntOrIdentifier ( $ intOrIdentifier ) { try { if ( gettype ( $ intOrIdentifier ) === 'integer' ) { $ this -> writeBoolean ( true ) ; $ this -> writeInteger ( $ intOrIdentifier ) ; } elseif ( gettype ( $ intOrIdentifier ) === 'string' ) { $ this -> writeBoolean ( false ) ; $ this -> writeString ( $ intOrIdentifier ) ; } else { $ msg = "The intOrIdentifier value to be written must be an integer or a string, '" . gettype ( $ intOrIdentifier ) . "' given." ; throw new QtiBinaryStreamAccessException ( $ msg , $ this , QtiBinaryStreamAccessException :: INTORIDENTIFIER ) ; } } catch ( BinaryStreamAccessException $ e ) { $ msg = "An error occured while writing an intOrIdentifier." ; throw new QtiBinaryStreamAccessException ( $ msg , $ this , QtiBinaryStreamAccessException :: INTORIDENTIFIER , $ e ) ; } }
Write an intOrIdentifier in the current binary stream.

@param integer|string $intOrIdentifier An integer or a string value.
@throws \qtism\runtime\storage\binary\QtiBinaryStreamAccessException
Write an intOrIdentifier in the current binary stream .