You are here

protected function Request::createResponseParts in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/jcalderonzumba/gastonjs/src/NetworkTraffic/Request.php \Zumba\GastonJS\NetworkTraffic\Request::createResponseParts()

Creates an array of Response objects from a given response array

Parameters

$responseParts:

Return value

array

1 call to Request::createResponseParts()
Request::__construct in vendor/jcalderonzumba/gastonjs/src/NetworkTraffic/Request.php

File

vendor/jcalderonzumba/gastonjs/src/NetworkTraffic/Request.php, line 30

Class

Request
Class Request @package Zumba\GastonJS\NetworkTraffic

Namespace

Zumba\GastonJS\NetworkTraffic

Code

protected function createResponseParts($responseParts) {
  if ($responseParts === null) {
    return array();
  }
  $responses = array();
  foreach ($responseParts as $responsePart) {
    $responses[] = new Response($responsePart);
  }
  return $responses;
}