Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
options = isset($options) ? $options : new JRegistry;
$this->client = isset($client) ? $client : new JGithubHttp($this->options);
// Setup the default API url if not already set.
$this->options->def('api.url', 'https://api.github.com');
}
/**
* Magic method to lazily create API objects
*
* @param string $name Name of property to retrieve
*
* @throws RuntimeException
*
* @since 11.3
* @return JGithubObject GitHub API object (gists, issues, pulls, etc).
*/
public function __get($name)
{
if (false == in_array($name, $this->packages))
{
// Check for a legacy class
if (in_array($name, $this->legacyPackages))
{
if (false == isset($this->$name))
{
$className = 'JGithub' . ucfirst($name);
$this->$name = new $className($this->options, $this->client);
}
return $this->$name;
}
throw new RuntimeException(sprintf('%1$s - Unknown package %2$s', __METHOD__, $name));
}
if (false == isset($this->$name))
{
$className = 'JGithubPackage' . ucfirst($name);
$this->$name = new $className($this->options, $this->client);
}
return $this->$name;
}
/**
* Get an option from the JGitHub instance.
*
* @param string $key The name of the option to get.
*
* @return mixed The option value.
*
* @since 11.3
*/
public function getOption($key)
{
return $this->options->get($key);
}
/**
* Set an option for the JGitHub instance.
*
* @param string $key The name of the option to set.
* @param mixed $value The option value to set.
*
* @return JGitHub This object for method chaining.
*
* @since 11.3
*/
public function setOption($key, $value)
{
$this->options->set($key, $value);
return $this;
}
}