protected function getTokenDouble($n, $n2)
 {
     $pos = $n2 + $n * 256;
     $ret = '';
     $subdict = true;
     TokenMap::GetToken($pos, $subdict, $ret);
     if (!$ret) {
         throw new Exception("BinTreeNodeReader->getToken: Invalid token {$pos}({$n} + {$n} * 256)");
     }
     return $ret;
 }
Beispiel #2
0
 protected function getToken($token)
 {
     $ret = "";
     $subdict = false;
     TokenMap::GetToken($token, $subdict, $ret);
     if (!$ret) {
         $token = $this->readInt8();
         TokenMap::GetToken($token, $subdict, $ret);
         if (!$ret) {
             return false;
         }
     }
     return $ret;
 }
Beispiel #3
0
 /**
  * @param $token
  * @return string
  * @throws \InvalidArgumentException
  */
 protected function getToken($token)
 {
     $ret = '';
     $subdict = false;
     TokenMap::GetToken($token, $subdict, $ret);
     if (!$ret) {
         $token = $this->readInt8();
         TokenMap::GetToken($token, $subdict, $ret);
         if (!$ret) {
             throw new \InvalidArgumentException('BinTreeNodeReader->getToken: Invalid token ' . $token);
         }
     }
     return $ret;
 }