33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-25 12:10:02 +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
*
2013-07-12 01:49:58 +00:00
* @property-read PTGithubRepos $repos GitHub API object for repos.
2012-09-09 01:53:44 +00:00
*/
2013-07-12 01:49:58 +00:00
class PTGithub extends JGithub
2012-09-09 01:53:44 +00:00
{
/**
2013-07-12 01:49:58 +00:00
* @var PTGithubRepos
2012-09-09 01:53:44 +00:00
*/
protected $repos;
public static function getInstance(JRegistry $options = null, JGithubHttp $client = null)
{
2013-07-12 01:49:58 +00:00
return new PTGithub($options, $client);
2012-09-09 01:53:44 +00:00
}
public function __get($name)
{
if ($name == 'repos')
{
if ($this->repos == null)
{
2013-07-12 01:49:58 +00:00
$this->repos = new PTGithubRepos($this->options, $this->client);
2012-09-09 01:53:44 +00:00
}
return $this->repos;
}
return parent::__get($name);
}
}