示例#1
0
 /**
  * Get token of node
  *
  * @param string $token
  *
  * @return string
  * @throws \Exception
  */
 protected function getToken($token)
 {
     $ret = "";
     $subdict = false;
     Token::getToken($token, $subdict, $ret);
     if (!$ret) {
         $token = $this->readInt8();
         Token::getToken($token, $subdict, $ret);
         if (!$ret) {
             throw new \Exception("BinTreeNodeReader->getToken: Invalid token {$token}");
         }
     }
     return $ret;
 }