← All changes
|
includes/sdk/google/google/gax/src/Middleware/OperationsMiddleware.php
+7
-6
1.2.2
→
1.4.1
View file →
| @@ -29,16 +29,17 @@ | ||
| 29 | 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 30 | 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 31 | 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | 32 | */ |
| 33 | -namespace Dudlewebs\WPMCS\Google\ApiCore\Middleware; | |
| 33 | +namespace Dudlewebs\WPMCS\GCP\Google\ApiCore\Middleware; | |
| 34 | 34 | |
| 35 | -use Dudlewebs\WPMCS\Google\ApiCore\Call; | |
| 36 | -use Dudlewebs\WPMCS\Google\ApiCore\OperationResponse; | |
| 37 | -use Dudlewebs\WPMCS\Google\Protobuf\Internal\Message; | |
| 38 | -use Dudlewebs\WPMCS\GuzzleHttp\Promise\PromiseInterface; | |
| 35 | +use Dudlewebs\WPMCS\GCP\Google\ApiCore\Call; | |
| 36 | +use Dudlewebs\WPMCS\GCP\Google\ApiCore\OperationResponse; | |
| 37 | +use Dudlewebs\WPMCS\GCP\Google\Protobuf\Internal\Message; | |
| 39 | 38 | /** |
| 40 | 39 | * Middleware which wraps the response in an OperationResponse object. |
| 40 | + * | |
| 41 | + * @internal | |
| 41 | 42 | */ |
| 42 | 43 | class OperationsMiddleware implements MiddlewareInterface |
| 43 | 44 | { |
| 44 | 45 | /** @var callable */ |
| @@ -56,9 +57,9 @@ | ||
| 56 | 57 | $next = $this->nextHandler; |
| 57 | 58 | return $next($call, $options)->then(function (Message $response) { |
| 58 | 59 | $options = $this->descriptor + ['lastProtoResponse' => $response]; |
| 59 | 60 | $operationNameMethod = $options['operationNameMethod'] ?? 'getName'; |
| 60 | - $operationName = call_user_func([$response, $operationNameMethod]); | |
| 61 | + $operationName = \call_user_func([$response, $operationNameMethod]); | |
| 61 | 62 | return new OperationResponse($operationName, $this->operationsClient, $options); |
| 62 | 63 | }); |
| 63 | 64 | } |
| 64 | 65 | } |