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