PHP Class TheIconic\Tracking\GoogleAnalytics\AnalyticsResponse

Represents the response got from GA.
Afficher le fichier Open project: theiconic/php-ga-measurement-protocol Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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 méthode

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 méthode

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

getHttpStatusCode() public méthode

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

getRequestUrl() public méthode

Gets the request URI used to get the response.
public getRequestUrl ( ) : string
Résultat string

Property Details

$httpStatusCode protected_oe property

HTTP status code for the response.
protected null|int $httpStatusCode
Résultat null | integer

$requestUrl protected_oe property

Request URI that was used to send the hit.
protected string $requestUrl
Résultat string

$responseBody protected_oe property

Response body.
protected string $responseBody
Résultat string