original_string: protected function parseResponse($response, $setAttributes = true)
  	{
  		if ($response['code'] == 200)
  		{
  			$data = $this->api->parseResponse($response['response'], $response['format']);
  
  			if ($response['format'] == 'xml') {
  				$data = json_encode($data);
  				$data = json_decode($data, true);
  			}
  
  			// print_r($data);
  
  			if ($setAttributes && is_array($data))
  				$this->setAttributes($data);
  
  			return $data;
  		}
  		elseif ($response['code'] == 404)
  		{
  			return false;
  		}
  		else
  		{
  			throw new XeroGeneralException('Error from Xero: ' . $response['response']);
  		}
  	}
code: protected function parseResponse($response, $setAttributes = true)
  	{
  		if ($response['code'] == 200)
  		{
  			$data = $this->api->parseResponse($response['response'], $response['format']);
  
  			if ($response['format'] == 'xml') {
  				$data = json_encode($data);
  				$data = json_decode($data, true);
  			}
  
  			// print_r($data);
  
  			if ($setAttributes && is_array($data))
  				$this->setAttributes($data);
  
  			return $data;
  		}
  		elseif ($response['code'] == 404)
  		{
  			return false;
  		}
  		else
  		{
  			throw new XeroGeneralException('Error from Xero: ' . $response['response']);
  		}
  	}
code_tokens: protected function parseResponse ( $ response , $ setAttributes = true ) { if ( $ response [ 'code' ] == 200 ) { $ data = $ this -> api -> parseResponse ( $ response [ 'response' ] , $ response [ 'format' ] ) ; if ( $ response [ 'format' ] == 'xml' ) { $ data = json_encode ( $ data ) ; $ data = json_decode ( $ data , true ) ; } // print_r($data); if ( $ setAttributes && is_array ( $ data ) ) $ this -> setAttributes ( $ data ) ; return $ data ; } elseif ( $ response [ 'code' ] == 404 ) { return false ; } else { throw new XeroGeneralException ( 'Error from Xero: ' . $ response [ 'response' ] ) ; } }
docstring: Parses the response retrieved from Xero,
  or throws an exception if it fails.
  
  @param  array $response
  @return array
docstring_tokens: Parses the response retrieved from Xero or throws an exception if it fails .