You are here

AddThisJson.php in AddThis 7.4

A class containing utility methods for json-related functionality.

File

classes/Util/AddThisJson.php
View source
<?php

/**
 * @file
 * A class containing utility methods for json-related functionality.
 */
class AddThisJson {
  public function decode($url) {
    $response = drupal_http_request($url);
    $responseOk = $response->code == 200;
    return $responseOk ? drupal_json_decode($response->data) : NULL;
  }

}

Classes

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