33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-24 20:00:26 +00:00
patchtester/administrator/components/com_patchtester/helpers/github/github.php
2013-07-11 20:49:58 -05:00

36 lines
709 B
PHP

<?php
/**
* User: elkuku
* Date: 08.09.12
* Time: 19:08
*
* @property-read PTGithubRepos $repos GitHub API object for repos.
*/
class PTGithub extends JGithub
{
/**
* @var PTGithubRepos
*/
protected $repos;
public static function getInstance(JRegistry $options = null, JGithubHttp $client = null)
{
return new PTGithub($options, $client);
}
public function __get($name)
{
if ($name == 'repos')
{
if ($this->repos == null)
{
$this->repos = new PTGithubRepos($this->options, $this->client);
}
return $this->repos;
}
return parent::__get($name);
}
}