Source for file object.php
Documentation is available at object.php
* @package Joomla.Platform
* @subpackage Openstreetmap
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
defined('JPATH_PLATFORM') or die();
* Openstreetmap API object class for the Joomla Platform
* @package Joomla.Platform
* @subpackage Openstreetmap
* Options for the Openstreetmap object.
* The HTTP client object to use in sending HTTP requests.
* @var JOpenstreetmapOauth
* @param JRegistry &$options Openstreetmap options object.
* @param JHttp $client The HTTP client object.
* @param JOpenstreetmapOauth $oauth Openstreetmap oauth client
public function __construct(JRegistry &$options =
null, JHttp $client =
null, JOpenstreetmapOauth $oauth =
null)
* Get an option from the JOpenstreetmapObject instance.
* @param string $key The name of the option to get.
* @return mixed The option value.
* Set an option for the JOpenstreetmapObject instance.
* @param string $key The name of the option to set.
* @param mixed $value The option value to set.
* @return JOpenstreetmapObject This object for method chaining.
* Method to send the request which does not require authentication.
* @param string $path The path of the request to make
* @param string $method The request method.
* @param array $headers The headers passed in the request.
* @param mixed $data Either an associative array or a string to be sent with the post request.
* @return SimpleXMLElement The XML response
* @throws DomainException
public function sendRequest($path, $method =
'GET', $headers =
array(), $data =
'')
$response =
$this->client->get($path, $headers);
$response =
$this->client->post($path, $data, $headers);
// Validate the response code.
if ($response->code !=
200)
throw
new DomainException($error, $response->code);
Documentation generated on Tue, 19 Nov 2013 15:09:45 +0100 by phpDocumentor 1.4.3