GeneralSearcherService.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace OpenSearch\Generated\GeneralSearcher;
  3. /**
  4. * Autogenerated by Thrift Compiler (0.10.0)
  5. *
  6. * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  7. * @generated
  8. */
  9. use Thrift\Base\TBase;
  10. use Thrift\Type\TType;
  11. use Thrift\Type\TMessageType;
  12. use Thrift\Exception\TException;
  13. use Thrift\Exception\TProtocolException;
  14. use Thrift\Protocol\TProtocol;
  15. use Thrift\Protocol\TBinaryProtocolAccelerated;
  16. use Thrift\Exception\TApplicationException;
  17. interface GeneralSearcherServiceIf {
  18. }
  19. class GeneralSearcherServiceClient implements \OpenSearch\Generated\GeneralSearcher\GeneralSearcherServiceIf {
  20. protected $input_ = null;
  21. protected $output_ = null;
  22. protected $seqid_ = 0;
  23. public function __construct($input, $output=null) {
  24. $this->input_ = $input;
  25. $this->output_ = $output ? $output : $input;
  26. }
  27. }
  28. // HELPER FUNCTIONS AND STRUCTURES
  29. class GeneralSearcherServiceProcessor {
  30. protected $handler_ = null;
  31. public function __construct($handler) {
  32. $this->handler_ = $handler;
  33. }
  34. public function process($input, $output) {
  35. $rseqid = 0;
  36. $fname = null;
  37. $mtype = 0;
  38. $input->readMessageBegin($fname, $mtype, $rseqid);
  39. $methodname = 'process_'.$fname;
  40. if (!method_exists($this, $methodname)) {
  41. $input->skip(TType::STRUCT);
  42. $input->readMessageEnd();
  43. $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD);
  44. $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid);
  45. $x->write($output);
  46. $output->writeMessageEnd();
  47. $output->getTransport()->flush();
  48. return;
  49. }
  50. $this->$methodname($rseqid, $input, $output);
  51. return true;
  52. }
  53. }