Ga_Lib_Api_Client.php
9 years ago
Ga_Lib_Api_Request.php
9 years ago
Ga_Lib_Api_Response.php
9 years ago
Ga_Lib_Api_Response.php
38 lines
| 1 | <?php |
| 2 | |
| 3 | class Ga_Lib_Api_Response { |
| 4 | |
| 5 | private $header; |
| 6 | private $body; |
| 7 | private $data; |
| 8 | |
| 9 | function __construct( $raw_response ) { |
| 10 | $this->setHeader( $raw_response[0] ); |
| 11 | $this->setBody( $raw_response[1] ); |
| 12 | $this->setData( json_decode( $raw_response[1], true ) ); |
| 13 | } |
| 14 | |
| 15 | public function setHeader( $header ) { |
| 16 | $this->header = $header; |
| 17 | } |
| 18 | |
| 19 | public function getHeader() { |
| 20 | return $this->header; |
| 21 | } |
| 22 | |
| 23 | public function setBody( $body ) { |
| 24 | $this->body = $body; |
| 25 | } |
| 26 | |
| 27 | public function getBody() { |
| 28 | return $this->body; |
| 29 | } |
| 30 | |
| 31 | public function setData( $data ) { |
| 32 | $this->data = $data; |
| 33 | } |
| 34 | |
| 35 | public function getData() { |
| 36 | return $this->data; |
| 37 | } |
| 38 | } |