Overview
  • Namespace
  • Class
  • Tree

Namespaces

  • OpenDNS
    • MES
      • Recurring
      • Reporting
      • Trident

Classes

  • Request
  • Response

Class Response

Base class for API responses.

Accessible as an array, but you can't change any values.

OpenDNS\MES\Response implements ArrayAccess
Namespace: OpenDNS\MES
Located at Response.php

Methods summary

public
# __construct( Guzzle\Http\Message\Response $guzzleResponse )

Parameters

$guzzleResponse
Raw Guzzle response from the contructor args
public string
# json( )

Get the response body as a JSON object

Get the response body as a JSON object

Returns

string
JSON string representing the MeS API response
public resource
# getResponseBodyStream( )

Get the response body as a stream resource

Get the response body as a stream resource

This is mostly useful for the reporting API, which returns CSV. You can use this together with fgetcsv().

Returns

resource
PHP stream resource representing the MeS response body
public boolean
# offsetExists( string|integer $offset )

Test whether a key exists in the response object

Test whether a key exists in the response object

Parameters

$offset

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public string
# offsetGet( string|integer $offset )

Get a response value by its key

Get a response value by its key

Parameters

$offset

Returns

string

Implementation of

ArrayAccess::offsetGet()

Methods inherited from ArrayAccess

offsetSet(), offsetUnset()

Magic methods summary

Properties summary

protected Guzzle\Http\Message\Response $guzzleResponse

Raw Guzzle response from the contructor args

Raw Guzzle response from the contructor args

#
protected string[] $fields

Parsed keys/values from the MeS response body

Parsed keys/values from the MeS response body

# array()
API documentation generated by ApiGen