1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-03 03:11:01 +01:00
phorge-phorge/externals/restful/src/RESTful/Exceptions/HTTPError.php
epriestley 23786784ef Add Balanced Payments API
Summary: Adds the Balanced PHP API to externals/. Ref T2787.

Test Plan: Used in next diff.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran, aurelijus

Maniphest Tasks: T2787

Differential Revision: https://secure.phabricator.com/D5764
2013-04-25 09:47:30 -07:00

28 lines
602 B
PHP

<?php
namespace RESTful\Exceptions;
/**
* Indicates an HTTP level error has occurred. The underlying HTTP response is
* stored as response member. The response payload fields if any are stored as
* members of the same name.
*
* @see \Httpful\Response
*/
class HTTPError extends Base
{
public $response;
public function __construct($response)
{
$this->response = $response;
$this->_objectify($this->response->body);
}
protected function _objectify($fields)
{
foreach ($fields as $key => $val) {
$this->$key = $val;
}
}
}