10 defined(
'JPATH_PLATFORM') or die;
128 $this->options = isset($options) ? $options :
new JRegistry;
129 $this->client = isset($client) ? $client :
new JGithubHttp($this->options);
132 $this->options->def(
'api.url',
'https://api.github.com');
145 public function __get($name)
147 $class =
'JGithub' . ucfirst($name);
149 if (class_exists($class))
151 if (
false == isset($this->$name))
153 $this->$name =
new $class($this->options, $this->client);
159 throw new InvalidArgumentException(sprintf(
'Argument %s produced an invalid class name: %s', $name, $class));
171 public function getOption($key)
173 return $this->options->get($key);
186 public function setOption($key, $value)
188 $this->options->set($key, $value);