protected function marshallIdentifier()
    {
        $identifier = $this->getToMarshall();
        $ctx = $this->getContext();
        $access = $ctx->getStreamAccess();

        try {
            $varName = $ctx->generateVariableName($identifier);
            $access->writeVariable($varName);
            $access->writeEquals($ctx->mustFormatOutput());
            $args = new PhpArgumentCollection(array(new PhpArgument($identifier->getValue())));
            $access->writeInstantiation(get_class($identifier), $args);
            $access->writeSemicolon($ctx->mustFormatOutput());

            $ctx->pushOnVariableStack($varName);
        } catch (StreamAccessException $e) {
            $msg = "An error occured while marshalling an Identifier object into the PHP source code stream.";
            throw new PhpMarshallingException($msg, PhpMarshallingException::STREAM, $e);
        }
    }
protected function marshallIdentifier()
    {
        $identifier = $this->getToMarshall();
        $ctx = $this->getContext();
        $access = $ctx->getStreamAccess();

        try {
            $varName = $ctx->generateVariableName($identifier);
            $access->writeVariable($varName);
            $access->writeEquals($ctx->mustFormatOutput());
            $args = new PhpArgumentCollection(array(new PhpArgument($identifier->getValue())));
            $access->writeInstantiation(get_class($identifier), $args);
            $access->writeSemicolon($ctx->mustFormatOutput());

            $ctx->pushOnVariableStack($varName);
        } catch (StreamAccessException $e) {
            $msg = "An error occured while marshalling an Identifier object into the PHP source code stream.";
            throw new PhpMarshallingException($msg, PhpMarshallingException::STREAM, $e);
        }
    }
protected function marshallIdentifier ( ) { $ identifier = $ this -> getToMarshall ( ) ; $ ctx = $ this -> getContext ( ) ; $ access = $ ctx -> getStreamAccess ( ) ; try { $ varName = $ ctx -> generateVariableName ( $ identifier ) ; $ access -> writeVariable ( $ varName ) ; $ access -> writeEquals ( $ ctx -> mustFormatOutput ( ) ) ; $ args = new PhpArgumentCollection ( array ( new PhpArgument ( $ identifier -> getValue ( ) ) ) ) ; $ access -> writeInstantiation ( get_class ( $ identifier ) , $ args ) ; $ access -> writeSemicolon ( $ ctx -> mustFormatOutput ( ) ) ; $ ctx -> pushOnVariableStack ( $ varName ) ; } catch ( StreamAccessException $ e ) { $ msg = "An error occured while marshalling an Identifier object into the PHP source code stream." ; throw new PhpMarshallingException ( $ msg , PhpMarshallingException :: STREAM , $ e ) ; } }
Marshall an Identifier QTI datatype object.

@throws \qtism\data\storage\php\marshalling\PhpMarshallingException
Marshall an Identifier QTI datatype object .