sdk/aliyun-opensearch-php-sdk/OpenSearch/Thrift/Protocol/TProtocol.php
public function skip($type)
  {
    switch ($type) {
    case TType::BOOL:
      return $this->readBool($bool);
    case TType::BYTE:
      return $this->readByte($byte);
    case TType::I16:
      return $this->readI16($i16);
    case TType::I32:
      return $this->readI32($i32);
    case TType::I64:
      return $this->readI64($i64);
    case TType::DOUBLE:
      return $this->readDouble($dub);
    case TType::STRING:
      return $this->readString($str);
    case TType::STRUCT:
      {
        $result = $this->readStructBegin($name);
        while (true) {
          $result += $this->readFieldBegin($name, $ftype, $fid);
          if ($ftype == TType::STOP) {
            break;
          }
          $result += $this->skip($ftype);
          $result += $this->readFieldEnd();
        }
        $result += $this->readStructEnd();

        return $result;
      }
    case TType::MAP:
      {
        $result = $this->readMapBegin($keyType, $valType, $size);
        for ($i = 0; $i < $size; $i++) {
          $result += $this->skip($keyType);
          $result += $this->skip($valType);
        }
        $result += $this->readMapEnd();

        return $result;
      }
    case TType::SET:
      {
        $result = $this->readSetBegin($elemType, $size);
        for ($i = 0; $i < $size; $i++) {
          $result += $this->skip($elemType);
        }
        $result += $this->readSetEnd();

        return $result;
      }
    case TType::LST:
      {
        $result = $this->readListBegin($elemType, $size);
        for ($i = 0; $i < $size; $i++) {
          $result += $this->skip($elemType);
        }
        $result += $this->readListEnd();

        return $result;
      }
    default:
      throw new TProtocolException('Unknown field type: '.$type,
                                   TProtocolException::INVALID_DATA);
    }
  }
public function skip($type)
  {
    switch ($type) {
    case TType::BOOL:
      return $this->readBool($bool);
    case TType::BYTE:
      return $this->readByte($byte);
    case TType::I16:
      return $this->readI16($i16);
    case TType::I32:
      return $this->readI32($i32);
    case TType::I64:
      return $this->readI64($i64);
    case TType::DOUBLE:
      return $this->readDouble($dub);
    case TType::STRING:
      return $this->readString($str);
    case TType::STRUCT:
      {
        $result = $this->readStructBegin($name);
        while (true) {
          $result += $this->readFieldBegin($name, $ftype, $fid);
          if ($ftype == TType::STOP) {
            break;
          }
          $result += $this->skip($ftype);
          $result += $this->readFieldEnd();
        }
        $result += $this->readStructEnd();

        return $result;
      }
    case TType::MAP:
      {
        $result = $this->readMapBegin($keyType, $valType, $size);
        for ($i = 0; $i < $size; $i++) {
          $result += $this->skip($keyType);
          $result += $this->skip($valType);
        }
        $result += $this->readMapEnd();

        return $result;
      }
    case TType::SET:
      {
        $result = $this->readSetBegin($elemType, $size);
        for ($i = 0; $i < $size; $i++) {
          $result += $this->skip($elemType);
        }
        $result += $this->readSetEnd();

        return $result;
      }
    case TType::LST:
      {
        $result = $this->readListBegin($elemType, $size);
        for ($i = 0; $i < $size; $i++) {
          $result += $this->skip($elemType);
        }
        $result += $this->readListEnd();

        return $result;
      }
    default:
      throw new TProtocolException('Unknown field type: '.$type,
                                   TProtocolException::INVALID_DATA);
    }
  }
public function skip ( $ type ) { switch ( $ type ) { case TType :: BOOL : return $ this -> readBool ( $ bool ) ; case TType :: BYTE : return $ this -> readByte ( $ byte ) ; case TType :: I16 : return $ this -> readI16 ( $ i16 ) ; case TType :: I32 : return $ this -> readI32 ( $ i32 ) ; case TType :: I64 : return $ this -> readI64 ( $ i64 ) ; case TType :: DOUBLE : return $ this -> readDouble ( $ dub ) ; case TType :: STRING : return $ this -> readString ( $ str ) ; case TType :: STRUCT : { $ result = $ this -> readStructBegin ( $ name ) ; while ( true ) { $ result += $ this -> readFieldBegin ( $ name , $ ftype , $ fid ) ; if ( $ ftype == TType :: STOP ) { break ; } $ result += $ this -> skip ( $ ftype ) ; $ result += $ this -> readFieldEnd ( ) ; } $ result += $ this -> readStructEnd ( ) ; return $ result ; } case TType :: MAP : { $ result = $ this -> readMapBegin ( $ keyType , $ valType , $ size ) ; for ( $ i = 0 ; $ i < $ size ; $ i ++ ) { $ result += $ this -> skip ( $ keyType ) ; $ result += $ this -> skip ( $ valType ) ; } $ result += $ this -> readMapEnd ( ) ; return $ result ; } case TType :: SET : { $ result = $ this -> readSetBegin ( $ elemType , $ size ) ; for ( $ i = 0 ; $ i < $ size ; $ i ++ ) { $ result += $ this -> skip ( $ elemType ) ; } $ result += $ this -> readSetEnd ( ) ; return $ result ; } case TType :: LST : { $ result = $ this -> readListBegin ( $ elemType , $ size ) ; for ( $ i = 0 ; $ i < $ size ; $ i ++ ) { $ result += $ this -> skip ( $ elemType ) ; } $ result += $ this -> readListEnd ( ) ; return $ result ; } default : throw new TProtocolException ( 'Unknown field type: ' . $ type , TProtocolException :: INVALID_DATA ) ; } }
The skip function is a utility to parse over unrecognized date without
causing corruption.

@param TType $type What type is it
The skip function is a utility to parse over unrecognized date without causing corruption .