10 defined(
'JPATH_PLATFORM') or die();
96 $this->oauth = $oauth;
97 $this->options = isset($options) ? $options :
new JRegistry;
98 $this->client = isset($client) ? $client :
new JHttp($this->options);
101 $this->options->def(
'api.url',
'http://api.openstreetmap.org/api/0.6/');
116 public function __get($name)
118 $class =
'JOpenstreetmap' . ucfirst($name);
120 if (class_exists($class))
122 if (
false == isset($this->$name))
124 $this->$name =
new $class($this->options, $this->client, $this->oauth);
130 throw new InvalidArgumentException(sprintf(
'Argument %s produced an invalid class name: %s', $name, $class));
142 public function getOption($key)
144 return $this->options->get($key);
157 public function setOption($key, $value)
159 $this->options->set($key, $value);