Project

General

Profile

Paste
Download (308 Bytes) Statistics
| Branch: | Revision:

root / drupal7 / sites / all / modules / addthis / classes / Util / AddThisJson.php @ 2c8c2b87

1
<?php
2
/**
3
 * @file
4
 * A class containing utility methods for json-related functionality.
5
 */
6

    
7
class AddThisJson {
8

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