33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2025-01-12 09:51:18 +00:00
patchtester/administrator/components/com_patchtester/helpers/github/github.php

36 lines
709 B
PHP
Raw Normal View History

2012-09-09 01:53:44 +00:00
<?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);
}
}