Exemplo n.º 1
0
 public static function get_resource_as_xml($uri)
 {
     $resource = Rest::get_resource($uri);
     if ($resource['data'] == null) {
         // $resource[status-code] should give the reason for null data, so just pass it along
         return $resource;
     }
     $xml = new SimpleXMLElement($resource['data']);
     $resource['data'] = $xml;
     return $resource;
 }
Exemplo n.º 2
0
 public static function get_result($id)
 {
     $uri = Resources::$BASEURI . "/jobs/" . $id . "/result";
     return Rest::get_resource($uri);
 }