public function readRecordField($isNull = false)
    {
        try {
            $key = $this->readString();

            if ($isNull === false) {
                $baseType = $this->readTinyInt();

                $toCall = 'read' . ucfirst(BaseType::getNameByConstant($baseType));
                $value = Utils::valueToRuntime(call_user_func(array($this, $toCall)), $baseType);
            } else {
                $value = null;
            }

            return array($key, $value);
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while reading a Record Field.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::RECORDFIELD, $e);
        }
    }
public function readRecordField($isNull = false)
    {
        try {
            $key = $this->readString();

            if ($isNull === false) {
                $baseType = $this->readTinyInt();

                $toCall = 'read' . ucfirst(BaseType::getNameByConstant($baseType));
                $value = Utils::valueToRuntime(call_user_func(array($this, $toCall)), $baseType);
            } else {
                $value = null;
            }

            return array($key, $value);
        } catch (BinaryStreamAccessException $e) {
            $msg = "An error occured while reading a Record Field.";
            throw new QtiBinaryStreamAccessException($msg, $this, QtiBinaryStreamAccessException::RECORDFIELD, $e);
        }
    }
public function readRecordField ( $ isNull = false ) { try { $ key = $ this -> readString ( ) ; if ( $ isNull === false ) { $ baseType = $ this -> readTinyInt ( ) ; $ toCall = 'read' . ucfirst ( BaseType :: getNameByConstant ( $ baseType ) ) ; $ value = Utils :: valueToRuntime ( call_user_func ( array ( $ this , $ toCall ) ) , $ baseType ) ; } else { $ value = null ; } return array ( $ key , $ value ) ; } catch ( BinaryStreamAccessException $ e ) { $ msg = "An error occured while reading a Record Field." ; throw new QtiBinaryStreamAccessException ( $ msg , $ this , QtiBinaryStreamAccessException :: RECORDFIELD , $ e ) ; } }
Read a record field value from the current binary stream. A record field is
composed of a key string and a value.

@return array An array where the value at index 0 is the key string and index 1 is the value.
@throws \qtism\runtime\storage\binary\QtiBinaryStreamAccessException
Read a record field value from the current binary stream . A record field is composed of a key string and a value .