protected function parseLinkHeader( $link ) {
		$parts = explode( ';', $link );
		$attrs = [
			'href' => trim( array_shift( $parts ), '<>' ),
		];
		foreach ( $parts as $part ) {
			if ( ! strpos( $part, '=' ) ) {
				continue;
			}
			list( $key, $value ) = explode( '=', $part, 2 );
			$key = trim( $key );
			$value = trim( $value, '" ' );
			$attrs[ $key ] = $value;
		}
		return $attrs;
	}
protected function parseLinkHeader( $link ) {
		$parts = explode( ';', $link );
		$attrs = [
			'href' => trim( array_shift( $parts ), '<>' ),
		];
		foreach ( $parts as $part ) {
			if ( ! strpos( $part, '=' ) ) {
				continue;
			}
			list( $key, $value ) = explode( '=', $part, 2 );
			$key = trim( $key );
			$value = trim( $value, '" ' );
			$attrs[ $key ] = $value;
		}
		return $attrs;
	}
protected function parseLinkHeader ( $ link ) { $ parts = explode ( ';' , $ link ) ; $ attrs = [ 'href' => trim ( array_shift ( $ parts ) , '<>' ) , ] ; foreach ( $ parts as $ part ) { if ( ! strpos ( $ part , '=' ) ) { continue ; } list ( $ key , $ value ) = explode ( '=' , $ part , 2 ) ; $ key = trim ( $ key ) ; $ value = trim ( $ value , '" ' ) ; $ attrs [ $ key ] = $ value ; } return $ attrs ; }
Parse a Link header into attributes.

@param string $link Link header from the response.

@return array Map of attribute key => attribute value, with link href in `href` key.
Parse a Link header into attributes .