You are here

public function AddThisJson::decode in AddThis 7.4

File

classes/Util/AddThisJson.php, line 9
A class containing utility methods for json-related functionality.

Class

AddThisJson
@file A class containing utility methods for json-related functionality.

Code

public function decode($url) {
  $response = drupal_http_request($url);
  $responseOk = $response->code == 200;
  return $responseOk ? drupal_json_decode($response->data) : NULL;
}