Response.php 842 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Elastica\Bulk;
  3. use Elastica\Response as BaseResponse;
  4. class Response extends BaseResponse
  5. {
  6. /**
  7. * @var \Elastica\Bulk\Action
  8. */
  9. protected $_action;
  10. /**
  11. * @var string
  12. */
  13. protected $_opType;
  14. /**
  15. * @param array|string $responseData
  16. * @param \Elastica\Bulk\Action $action
  17. * @param string $opType
  18. */
  19. public function __construct($responseData, Action $action, $opType)
  20. {
  21. parent::__construct($responseData);
  22. $this->_action = $action;
  23. $this->_opType = $opType;
  24. }
  25. /**
  26. * @return \Elastica\Bulk\Action
  27. */
  28. public function getAction()
  29. {
  30. return $this->_action;
  31. }
  32. /**
  33. * @return string
  34. */
  35. public function getOpType()
  36. {
  37. return $this->_opType;
  38. }
  39. }