PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/google/google/gax/src/Middleware/PagedMiddleware.php +9 -8 1.1.0 → 1.4.2 View file →
@@ -29,18 +29,19 @@
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\Page;
37 -use Dudlewebs\WPMCS\Google\ApiCore\PagedListResponse;
38 -use Dudlewebs\WPMCS\Google\ApiCore\PageStreamingDescriptor;
39 -use Dudlewebs\WPMCS\Google\Protobuf\Internal\Message;
40 -use Dudlewebs\WPMCS\GuzzleHttp\Promise\PromiseInterface;
35 +use Dudlewebs\WPMCS\GCP\Google\ApiCore\Call;
36 +use Dudlewebs\WPMCS\GCP\Google\ApiCore\Page;
37 +use Dudlewebs\WPMCS\GCP\Google\ApiCore\PagedListResponse;
38 +use Dudlewebs\WPMCS\GCP\Google\ApiCore\PageStreamingDescriptor;
39 +use Dudlewebs\WPMCS\GCP\Google\Protobuf\Internal\Message;
41 40 /**
42 41 * Middleware which wraps the response in an PagedListResponses object.
42 +*
43 +* @internal
43 44 */
44 45 class PagedMiddleware implements MiddlewareInterface
45 46 {
46 47 /** @var callable */
@@ -58,9 +59,9 @@
58 59 public function __invoke(Call $call, array $options)
59 60 {
60 61 $next = $this->nextHandler;
61 62 $descriptor = $this->descriptor;
62 - return $next($call, $options)->then(function (Message $response) use ($call, $next, $options, $descriptor) {
63 + return $next($call, $options)->then(function (Message $response) use($call, $next, $options, $descriptor) {
63 64 $page = new Page($call, $options, $next, $descriptor, $response);
64 65 return new PagedListResponse($page);
65 66 });
66 67 }