User

Extends \Joomla\OpenStreetMap\OpenStreetMapObject

OpenStreetMap API User class for the Joomla Framework

deprecated
since

1.0

deprecated

The joomla/openstreetmap package is deprecated

Methods

__construct

Constructor

__construct(array $options = array(), \Joomla\Http\Http $client = null, \Joomla\OpenStreetMap\OAuth $oauth = null) 
inherited
since

1.0

Arguments

$options

arrayOpenStreetMap options object.

$client

\Joomla\Http\HttpThe HTTP client object.

$oauth

\Joomla\OpenStreetMap\OAuthOpenStreetMap OAuth client

changePreference

Method to change user preferences

changePreference(string $key, string $preference) : array
since

1.0

Arguments

$key

stringKey of the preference

$preference

stringNew value for preference

Response

arrayThe XML response

getDetails

Method to get user details

getDetails() : array
since

1.0

Response

arrayThe XML response

getOption

Get an option from the OpenStreetMapObject instance.

getOption(string $key) : mixed
inherited
since

1.0

Arguments

$key

stringThe name of the option to get.

Response

mixedThe option value.

getPreferences

Method to get preferences

getPreferences() : array
since

1.0

Response

arrayThe XML response

replacePreferences

Method to replace user preferences

replacePreferences(array $preferences) : array
since

1.0

Arguments

$preferences

arrayArray of new preferences

Response

arrayThe XML response

sendRequest

Method to send the request which does not require authentication.

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

1.0

throws

\DomainException

Arguments

$path

stringThe path of the request to make

$method

stringThe request method.

$headers

arrayThe headers passed in the request.

$data

mixedEither an associative array or a string to be sent with the post request.

Response

\SimpleXMLElementThe XML response

setOption

Set an option for the OpenStreetMapObject instance.

setOption(string $key, mixed $value) : \Joomla\OpenStreetMap\OpenStreetMapObject
inherited
since

1.0

Arguments

$key

stringThe name of the option to set.

$value

mixedThe option value to set.

Response

\Joomla\OpenStreetMap\OpenStreetMapObjectThis object for method chaining.

Properties

options

Options for the OpenStreetMap object.

inherited
since

1.0

Type(s)

array

client

The HTTP client object to use in sending HTTP requests.

inherited
since

1.0

Type(s)

\Joomla\Http\Http

oauth

The OAuth client.

inherited
since

1.0

Type(s)

\Joomla\OpenStreetMap\OAuth