public function redaction($element, $id, $version, $redactionId)
	{
		if ($element != 'node' && $element != 'way' && $element != 'relation')
		{
			throw new \DomainException('Element should be a node, a way or a relation');
		}

		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key'],
		);

		// Set the API base
		$base = $element . '/' . $id . '/' . $version . '/redact?redaction=' . $redactionId;

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'PUT', $parameters);

		return simplexml_load_string($response->body);
	}
public function redaction($element, $id, $version, $redactionId)
	{
		if ($element != 'node' && $element != 'way' && $element != 'relation')
		{
			throw new \DomainException('Element should be a node, a way or a relation');
		}

		$token = $this->oauth->getToken();

		// Set parameters.
		$parameters = array(
			'oauth_token' => $token['key'],
		);

		// Set the API base
		$base = $element . '/' . $id . '/' . $version . '/redact?redaction=' . $redactionId;

		// Build the request path.
		$path = $this->getOption('api.url') . $base;

		// Send the request.
		$response = $this->oauth->oauthRequest($path, 'PUT', $parameters);

		return simplexml_load_string($response->body);
	}
public function redaction ( $ element , $ id , $ version , $ redactionId ) { if ( $ element != 'node' && $ element != 'way' && $ element != 'relation' ) { throw new \ DomainException ( 'Element should be a node, a way or a relation' ) ; } $ token = $ this -> oauth -> getToken ( ) ; // Set parameters. $ parameters = array ( 'oauth_token' => $ token [ 'key' ] , ) ; // Set the API base $ base = $ element . '/' . $ id . '/' . $ version . '/redact?redaction=' . $ redactionId ; // Build the request path. $ path = $ this -> getOption ( 'api.url' ) . $ base ; // Send the request. $ response = $ this -> oauth -> oauthRequest ( $ path , 'PUT' , $ parameters ) ; return simplexml_load_string ( $ response -> body ) ; }
Method used by the DWG to hide old versions of elements containing data privacy or copyright infringements

@param   string   $element      [node|way|relation]
@param   integer  $id           Element identifier
@param   integer  $version      Element version
@param   integer  $redactionId  Redaction id

@return  array   The xml response

@since   1.0
@throws  \DomainException
Method used by the DWG to hide old versions of elements containing data privacy or copyright infringements