JOpenstreetmapUser
Extends \JOpenstreetmapObjectOpenstreetmap API User class for the Joomla Platform
since |
3.2.0 |
---|---|
deprecated |
4.0 Use the |
package |
Joomla.Platform |
Methods
__construct
Constructor
__construct(\Joomla\Registry\Registry &$options = null, \JHttp $client = null, \JOpenstreetmapOauth $oauth = null)
since |
3.2.0 |
---|
Arguments
- $options
- $client
\JHttp
The HTTP client object.- $oauth
\JOpenstreetmapOauth
Openstreetmap oauth client
changePreference
Method to change user preferences
changePreference(string $key, string $preference) : array
since |
3.2.0 |
---|
Arguments
- $key
string
Key of the preference- $preference
string
New value for preference
Response
array
The XML response
getDetails
Method to get user details
getDetails() : array
since |
3.2.0 |
---|
Response
array
The XML response
getOption
Get an option from the JOpenstreetmapObject instance.
getOption(string $key) : mixed
since |
3.2.0 |
---|
Arguments
- $key
string
The name of the option to get.
Response
mixed
The option value.
getPreferences
Method to get preferences
getPreferences() : array
since |
3.2.0 |
---|
Response
array
The XML response
replacePreferences
Method to replace user preferences
replacePreferences(array $preferences) : array
since |
3.2.0 |
---|
Arguments
- $preferences
array
Array of new preferences
Response
array
The 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
since |
3.2.0 |
---|---|
throws |
|
Arguments
- $path
string
The path of the request to make- $method
string
The request method.- $headers
array
The headers passed in the request.- $data
mixed
Either an associative array or a string to be sent with the post request.
Response
\SimpleXMLElement
The XML response
setOption
Set an option for the JOpenstreetmapObject instance.
setOption(string $key, mixed $value) : \JOpenstreetmapObject
since |
3.2.0 |
---|
Arguments
- $key
string
The name of the option to set.- $value
mixed
The option value to set.
Response
\JOpenstreetmapObject
This object for method chaining.
Properties
options
Options for the Openstreetmap object.
client
The HTTP client object to use in sending HTTP requests.
since |
3.2.0 |
---|
Type(s)
\JHttp