Example #1
0
 /**
  * Reload the resource from a given url.  This is useful after the remote resource has been
  * modified.
  *
  * @return object   Gallery3
  */
 public function load()
 {
     $response = Gallery3_Helper::request("get", $this->url, $this->token);
     $this->data = $response;
     $this->original_entity = (array) $response->entity;
     return $this;
 }
Example #2
0
 static function request($method, $url, $token = null, $params = array(), $file = null)
 {
     if (!isset(self::$instance)) {
         @(include "HTTP/Request2.php");
         if (class_exists("HTTP_Request2")) {
             self::$instance = new Gallery3_Helper_HTTP_Request2();
         } else {
             include "HTTP/Request.php";
             self::$instance = new Gallery3_Helper_HTTP_Request();
         }
     }
     return self::$instance->request($method, $url, $token, $params, $file);
 }