public function set_self_link($link, $meta_data=null) {
	if ($meta_data) {
		// can not combine both raw link object and extra meta data
		if (is_string($link) == false) {
			throw new \Exception('link "self" should be a string if meta data is provided separate');
		}
		
		if (is_object($meta_data)) {
			$meta_data = parent::convert_object_to_array($meta_data);
		}
		
		$link = array(
			'href' => $link,
			'meta' => $meta_data,
		);
	}
	
	$this->links['self'] = $link;
}
public function set_self_link($link, $meta_data=null) {
	if ($meta_data) {
		// can not combine both raw link object and extra meta data
		if (is_string($link) == false) {
			throw new \Exception('link "self" should be a string if meta data is provided separate');
		}
		
		if (is_object($meta_data)) {
			$meta_data = parent::convert_object_to_array($meta_data);
		}
		
		$link = array(
			'href' => $link,
			'meta' => $meta_data,
		);
	}
	
	$this->links['self'] = $link;
}
public function set_self_link ( $ link , $ meta_data = null ) { if ( $ meta_data ) { // can not combine both raw link object and extra meta data if ( is_string ( $ link ) == false ) { throw new \ Exception ( 'link "self" should be a string if meta data is provided separate' ) ; } if ( is_object ( $ meta_data ) ) { $ meta_data = parent :: convert_object_to_array ( $ meta_data ) ; } $ link = array ( 'href' => $ link , 'meta' => $ meta_data , ) ; } $ this -> links [ 'self' ] = $ link ; }
sets the link to the request used to give this response
this will end up in response.links.self ..
and in response.data.links.self for single resource objects

by default this is already set using $_SERVER variables
use this method to override this default behavior
@see ::__construct()

@param  string $link
@param  mixed  $meta_data optional, meta data as key-value pairs
objects are converted in arrays, @see base::convert_object_to_array()
@return void
sets the link to the request used to give this response this will end up in response . links . self .. and in response . data . links . self for single resource objects