class JOpenstreetmapObject

Openstreetmap API object class for the Joomla Platform

Methods

__construct( Registry $options = null, JHttp $client = null, JOpenstreetmapOauth $oauth = null)

Constructor

mixed
getOption( string $key)

Get an option from the JOpenstreetmapObject instance.

setOption( string $key, mixed $value)

Set an option for the JOpenstreetmapObject instance.

sendRequest( string $path, string $method = 'GET', array $headers = array(), mixed $data = '')

Method to send the request which does not require authentication.

Details

__construct( Registry $options = null, JHttp $client = null, JOpenstreetmapOauth $oauth = null)

Constructor

Parameters

Registry $options &$options Openstreetmap options object.
JHttp $client The HTTP client object.
JOpenstreetmapOauth $oauth Openstreetmap oauth client

mixed getOption( string $key)

Get an option from the JOpenstreetmapObject instance.

Parameters

string $key The name of the option to get.

Return Value

mixed The option value.

JOpenstreetmapObject setOption( string $key, mixed $value)

Set an option for the JOpenstreetmapObject instance.

Parameters

string $key The name of the option to set.
mixed $value The option value to set.

Return Value

JOpenstreetmapObject This object for method chaining.

SimpleXMLElement sendRequest( string $path, string $method = 'GET', array $headers = array(), mixed $data = '')

Method to send the request which does not require authentication.

Parameters

string $path The path of the request to make
string $method The request method.
array $headers The headers passed in the request.
mixed $data Either an associative array or a string to be sent with the post request.

Return Value

SimpleXMLElement The XML response

Exceptions

DomainException