PHP Class TheIconic\Tracking\GoogleAnalytics\AnalyticsResponse

Represents the response got from GA.
显示文件 Open project: theiconic/php-ga-measurement-protocol Class Usage Examples

Protected Properties

Property Type Description
$httpStatusCode null | integer HTTP status code for the response.
$requestUrl string Request URI that was used to send the hit.
$responseBody string Response body.

Public Methods

Method Description
__construct ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface | GuzzleHttp\Promise\PromiseInterface $response ) Gets the relevant data from the Guzzle clients.
getDebugResponse ( ) : array Gets the debug response. Returns empty array if no response found.
getHttpStatusCode ( ) : null | integer Gets the HTTP status code.
getRequestUrl ( ) : string Gets the request URI used to get the response.

Method Details

__construct() public method

Gets the relevant data from the Guzzle clients.
public __construct ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface | GuzzleHttp\Promise\PromiseInterface $response )
$request Psr\Http\Message\RequestInterface
$response Psr\Http\Message\ResponseInterface | GuzzleHttp\Promise\PromiseInterface

getDebugResponse() public method

Gets the debug response. Returns empty array if no response found.
public getDebugResponse ( ) : array
return array

getHttpStatusCode() public method

It return NULL if the request was asynchronous since we are not waiting for the response.
public getHttpStatusCode ( ) : null | integer
return null | integer

getRequestUrl() public method

Gets the request URI used to get the response.
public getRequestUrl ( ) : string
return string

Property Details

$httpStatusCode protected_oe property

HTTP status code for the response.
protected null|int $httpStatusCode
return null | integer

$requestUrl protected_oe property

Request URI that was used to send the hit.
protected string $requestUrl
return string

$responseBody protected_oe property

Response body.
protected string $responseBody
return string