/** * PaginationException constructor. */ public function __construct() { parent::__construct("Error: pagination() | This method doesn't support pagination."); }
public function __get($name) { $accessible = array('responseText' => 1, 'headers' => 1, 'code' => 1); $this->responseText = $this->__resp->data; $this->headers = $this->__resp->headers; $this->code = $this->__resp->code; if (isset($accessible[$name]) && $accessible[$name]) { return $this->{$name}; } elseif (($this->code < 200 || $this->code >= 400) && !isset($accessible[$name])) { InstagramException::raise($this->__resp, $this->debug); } // Call appears ok so we can fill in the response $this->response = json_decode($this->responseText, 1); $this->response = $this->response; $this->__obj = json_decode($this->responseText); $this->__obj = $this->__obj; if (gettype($this->__obj) === 'object') { foreach ($this->__obj as $k => $v) { $this->{$k} = $v; } } if (property_exists($this, $name)) { return $this->{$name}; } return null; }
/** * CurlException constructor. * * @param $curl_error */ public function __construct($curl_error) { parent::__construct('cURL error: ' . $curl_error, 500); }