private function checkResponse($http_code_required, $response) {
		// check passed data
    if(is_array($http_code_required)) {
		  array_walk($http_code_required, function($value, $key) {
        if(!is_int($value)) {
    			throw new LinkedInException('LinkedIn->checkResponse(): $http_code_required must be an integer or an array of integer values');
    		}
      });
		} else {
		  if(!is_int($http_code_required)) {
  			throw new LinkedInException('LinkedIn->checkResponse(): $http_code_required must be an integer or an array of integer values');
  		} else {
  		  $http_code_required = array($http_code_required);
  		}
		}
		if(!is_array($response)) {
			throw new LinkedInException('LinkedIn->checkResponse(): $response must be an array');
		}		
		
		// check for a match
		if(in_array($response['info']['http_code'], $http_code_required)) {
		  // response found
		  $response['success'] = TRUE;
		} else {
			// response not found
			$response['success'] = FALSE;
			$response['error']   = 'HTTP response from LinkedIn end-point was not code ' . implode(', ', $http_code_required);
		}
		return $response;
	}
private function checkResponse($http_code_required, $response) {
		// check passed data
    if(is_array($http_code_required)) {
		  array_walk($http_code_required, function($value, $key) {
        if(!is_int($value)) {
    			throw new LinkedInException('LinkedIn->checkResponse(): $http_code_required must be an integer or an array of integer values');
    		}
      });
		} else {
		  if(!is_int($http_code_required)) {
  			throw new LinkedInException('LinkedIn->checkResponse(): $http_code_required must be an integer or an array of integer values');
  		} else {
  		  $http_code_required = array($http_code_required);
  		}
		}
		if(!is_array($response)) {
			throw new LinkedInException('LinkedIn->checkResponse(): $response must be an array');
		}		
		
		// check for a match
		if(in_array($response['info']['http_code'], $http_code_required)) {
		  // response found
		  $response['success'] = TRUE;
		} else {
			// response not found
			$response['success'] = FALSE;
			$response['error']   = 'HTTP response from LinkedIn end-point was not code ' . implode(', ', $http_code_required);
		}
		return $response;
	}
private function checkResponse ( $ http_code_required , $ response ) { // check passed data if ( is_array ( $ http_code_required ) ) { array_walk ( $ http_code_required , function ( $ value , $ key ) { if ( ! is_int ( $ value ) ) { throw new LinkedInException ( 'LinkedIn->checkResponse(): $http_code_required must be an integer or an array of integer values' ) ; } } ) ; } else { if ( ! is_int ( $ http_code_required ) ) { throw new LinkedInException ( 'LinkedIn->checkResponse(): $http_code_required must be an integer or an array of integer values' ) ; } else { $ http_code_required = array ( $ http_code_required ) ; } } if ( ! is_array ( $ response ) ) { throw new LinkedInException ( 'LinkedIn->checkResponse(): $response must be an array' ) ; } // check for a match if ( in_array ( $ response [ 'info' ] [ 'http_code' ] , $ http_code_required ) ) { // response found $ response [ 'success' ] = TRUE ; } else { // response not found $ response [ 'success' ] = FALSE ; $ response [ 'error' ] = 'HTTP response from LinkedIn end-point was not code ' . implode ( ', ' , $ http_code_required ) ; } return $ response ; }
Used to check whether a response LinkedIn object has the required http_code or not and
returns an appropriate LinkedIn object.

@param var $http_code_required
The required http response from LinkedIn, passed in either as an integer,
or an array of integers representing the expected values.
@param arr $response
An array containing a LinkedIn response.

@return boolean
TRUE or FALSE depending on if the passed LinkedIn response matches the expected response.
Used to check whether a response LinkedIn object has the required http_code or not and returns an appropriate LinkedIn object .