private function unserializeKey()
{
$tag = $this->stream->getc();
switch ($tag) {
case '0':
return 0;
case '1':
return 1;
case '2':
return 2;
case '3':
return 3;
case '4':
return 4;
case '5':
return 5;
case '6':
return 6;
case '7':
return 7;
case '8':
return 8;
case '9':
return 9;
case Tags::TagInteger:
return $this->readIntegerWithoutTag();
case Tags::TagLong:
case Tags::TagDouble:
return $this->readLongWithoutTag();
case Tags::TagNull:
return 'null';
case Tags::TagEmpty:
return '';
case Tags::TagTrue:
return 'true';
case Tags::TagFalse:
return 'false';
case Tags::TagNaN:
return (string) log(-1);
case Tags::TagInfinity:
return (string) $this->readInfinityWithoutTag();
case Tags::TagBytes:
return $this->readBytesWithoutTag();
case Tags::TagUTF8Char:
return $this->readUTF8CharWithoutTag();
case Tags::TagString:
return $this->readStringWithoutTag();
case Tags::TagGuid:
return $this->readGuidWithoutTag();
case Tags::TagRef:
return (string) $this->readRef();
case Tags::TagError:
throw new Exception($this->privateReadString());
default:
throw $this->unexpectedTag($tag);
}
}