public function get_array() {
	$response_part = array();
	
	// the basics
	$response_part['status'] = $this->http_status;
	if (base::$debug) {
		$response_part['code'] = $this->error_message;
	}
	
	// user guidance
	if ($this->friendly_message) {
		$response_part['title'] = $this->friendly_message;
	}
	if ($this->friendly_detail) {
		$response_part['detail'] = $this->friendly_detail;
	}
	
	// the source of the problem
	if ($this->post_body_pointer || $this->get_parameter_name) {
		$response_part['source'] = array();
		
		if ($this->post_body_pointer) {
			$response_part['source']['pointer'] = $this->post_body_pointer;
		}
		if ($this->get_parameter_name) {
			$response_part['source']['parameter'] = $this->get_parameter_name;
		}
	}
	
	// technical guidance
	if ($this->about_link) {
		$response_part['links'] = array(
			'about' => $this->about_link,
		);
	}
	if ($this->identifier) {
		$response_part['id'] = $this->identifier;
	}
	
	// meta data
	if ($this->meta_data) {
		$response_part['meta'] = $this->meta_data;
	}
	
	return $response_part;
}
public function get_array() {
	$response_part = array();
	
	// the basics
	$response_part['status'] = $this->http_status;
	if (base::$debug) {
		$response_part['code'] = $this->error_message;
	}
	
	// user guidance
	if ($this->friendly_message) {
		$response_part['title'] = $this->friendly_message;
	}
	if ($this->friendly_detail) {
		$response_part['detail'] = $this->friendly_detail;
	}
	
	// the source of the problem
	if ($this->post_body_pointer || $this->get_parameter_name) {
		$response_part['source'] = array();
		
		if ($this->post_body_pointer) {
			$response_part['source']['pointer'] = $this->post_body_pointer;
		}
		if ($this->get_parameter_name) {
			$response_part['source']['parameter'] = $this->get_parameter_name;
		}
	}
	
	// technical guidance
	if ($this->about_link) {
		$response_part['links'] = array(
			'about' => $this->about_link,
		);
	}
	if ($this->identifier) {
		$response_part['id'] = $this->identifier;
	}
	
	// meta data
	if ($this->meta_data) {
		$response_part['meta'] = $this->meta_data;
	}
	
	return $response_part;
}
public function get_array ( ) { $ response_part = array ( ) ; // the basics $ response_part [ 'status' ] = $ this -> http_status ; if ( base :: $ debug ) { $ response_part [ 'code' ] = $ this -> error_message ; } // user guidance if ( $ this -> friendly_message ) { $ response_part [ 'title' ] = $ this -> friendly_message ; } if ( $ this -> friendly_detail ) { $ response_part [ 'detail' ] = $ this -> friendly_detail ; } // the source of the problem if ( $ this -> post_body_pointer || $ this -> get_parameter_name ) { $ response_part [ 'source' ] = array ( ) ; if ( $ this -> post_body_pointer ) { $ response_part [ 'source' ] [ 'pointer' ] = $ this -> post_body_pointer ; } if ( $ this -> get_parameter_name ) { $ response_part [ 'source' ] [ 'parameter' ] = $ this -> get_parameter_name ; } } // technical guidance if ( $ this -> about_link ) { $ response_part [ 'links' ] = array ( 'about' => $ this -> about_link , ) ; } if ( $ this -> identifier ) { $ response_part [ 'id' ] = $ this -> identifier ; } // meta data if ( $ this -> meta_data ) { $ response_part [ 'meta' ] = $ this -> meta_data ; } return $ response_part ; }
generates an array for inclusion in the whole response body of an errors collection

@note error message (`code`) is only shown when debug mode is on (@see base::$debug)

@see jsonapi.org/format

@return array, containing:
- status
- code
- title
- detail
- source
- pointer
- parameter
- links
- about
- id
- meta
generates an array for inclusion in the whole response body of an errors collection