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
2012-09-08 20:53:44 -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);
}
}