Release of v3.2.1-alpha1
Add power path override option on component level. Fix the sql build feature. #1032.
This commit is contained in:
184
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Admin.php
Normal file
184
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Admin.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Admin\Cron;
|
||||
use VDM\Joomla\Gitea\Admin\Organizations;
|
||||
use VDM\Joomla\Gitea\Admin\Unadopted;
|
||||
use VDM\Joomla\Gitea\Admin\Users;
|
||||
use VDM\Joomla\Gitea\Admin\Users\Keys;
|
||||
use VDM\Joomla\Gitea\Admin\Users\Organization;
|
||||
use VDM\Joomla\Gitea\Admin\Users\Repository;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Admin Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Admin implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Cron::class, 'Gitea.Admin.Cron')
|
||||
->share('Gitea.Admin.Cron', [$this, 'getCron'], true);
|
||||
|
||||
$container->alias(Organizations::class, 'Gitea.Admin.Organizations')
|
||||
->share('Gitea.Admin.Organizations', [$this, 'getOrganizations'], true);
|
||||
|
||||
$container->alias(Unadopted::class, 'Gitea.Admin.Unadopted')
|
||||
->share('Gitea.Admin.Unadopted', [$this, 'getUnadopted'], true);
|
||||
|
||||
$container->alias(Users::class, 'Gitea.Admin.Users')
|
||||
->share('Gitea.Admin.Users', [$this, 'getUsers'], true);
|
||||
|
||||
$container->alias(Keys::class, 'Gitea.Admin.Users.Keys')
|
||||
->share('Gitea.Admin.Users.Keys', [$this, 'getKeys'], true);
|
||||
|
||||
$container->alias(Organization::class, 'Gitea.Admin.Users.Organization')
|
||||
->share('Gitea.Admin.Users.Organization', [$this, 'getOrganization'], true);
|
||||
|
||||
$container->alias(Repository::class, 'Gitea.Admin.Users.Repository')
|
||||
->share('Gitea.Admin.Users.Repository', [$this, 'getRepository'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Cron class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Cron
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getCron(Container $container): Cron
|
||||
{
|
||||
return new Cron(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Organizations class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Organizations
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getOrganizations(Container $container): Organizations
|
||||
{
|
||||
return new Organizations(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Unadopted class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Unadopted
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getUnadopted(Container $container): Unadopted
|
||||
{
|
||||
return new Unadopted(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Users class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Users
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getUsers(Container $container): Users
|
||||
{
|
||||
return new Users(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Keys class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Keys
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getKeys(Container $container): Keys
|
||||
{
|
||||
return new Keys(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Organization class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Organization
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getOrganization(Container $container): Organization
|
||||
{
|
||||
return new Organization(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Repository class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Repository
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRepository(Container $container): Repository
|
||||
{
|
||||
return new Repository(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
294
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Issue.php
Normal file
294
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Issue.php
Normal file
@@ -0,0 +1,294 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Issue as Issu;
|
||||
use VDM\Joomla\Gitea\Issue\Comments;
|
||||
use VDM\Joomla\Gitea\Issue\Repository\Comments as RepoComments;
|
||||
use VDM\Joomla\Gitea\Issue\Deadline;
|
||||
use VDM\Joomla\Gitea\Labels;
|
||||
use VDM\Joomla\Gitea\Issue\Labels as IssueLabels;
|
||||
use VDM\Joomla\Gitea\Issue\Milestones;
|
||||
use VDM\Joomla\Gitea\Issue\Reactions;
|
||||
use VDM\Joomla\Gitea\Issue\Reactions\Comment;
|
||||
use VDM\Joomla\Gitea\Issue\Stopwatch;
|
||||
use VDM\Joomla\Gitea\Issue\Subscriptions;
|
||||
use VDM\Joomla\Gitea\Issue\Timeline;
|
||||
use VDM\Joomla\Gitea\Issue\Times;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Issue Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Issue implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Issu::class, 'Gitea.Issue')
|
||||
->share('Gitea.Issue', [$this, 'getIssue'], true);
|
||||
|
||||
$container->alias(Comments::class, 'Gitea.Issue.Comments')
|
||||
->share('Gitea.Issue.Comments', [$this, 'getComments'], true);
|
||||
|
||||
$container->alias(RepoComments::class, 'Gitea.Issue.Repository.Comments')
|
||||
->share('Gitea.Issue.Repository.Comments', [$this, 'getRepoComments'], true);
|
||||
|
||||
$container->alias(Deadline::class, 'Gitea.Issue.Deadline')
|
||||
->share('Gitea.Issue.Deadline', [$this, 'getDeadline'], true);
|
||||
|
||||
$container->alias(Labels::class, 'Gitea.Labels')
|
||||
->share('Gitea.Labels', [$this, 'getLabels'], true);
|
||||
|
||||
$container->alias(IssueLabels::class, 'Gitea.Issue.Labels')
|
||||
->share('Gitea.Issue.Labels', [$this, 'getIssueLabels'], true);
|
||||
|
||||
$container->alias(Milestones::class, 'Gitea.Issue.Milestones')
|
||||
->share('Gitea.Issue.Milestones', [$this, 'getMilestones'], true);
|
||||
|
||||
$container->alias(Reactions::class, 'Gitea.Issue.Reactions')
|
||||
->share('Gitea.Issue.Reactions', [$this, 'getReactions'], true);
|
||||
|
||||
$container->alias(Comment::class, 'Gitea.Issue.Reactions.Comment')
|
||||
->share('Gitea.Issue.Reactions.Comment', [$this, 'getComment'], true);
|
||||
|
||||
$container->alias(Stopwatch::class, 'Gitea.Issue.Stopwatch')
|
||||
->share('Gitea.Issue.Stopwatch', [$this, 'getStopwatch'], true);
|
||||
|
||||
$container->alias(Subscriptions::class, 'Gitea.Issue.Subscriptions')
|
||||
->share('Gitea.Issue.Subscriptions', [$this, 'getSubscriptions'], true);
|
||||
|
||||
$container->alias(Timeline::class, 'Gitea.Issue.Timeline')
|
||||
->share('Gitea.Issue.Timeline', [$this, 'getTimeline'], true);
|
||||
|
||||
$container->alias(Times::class, 'Gitea.Issue.Times')
|
||||
->share('Gitea.Issue.Times', [$this, 'getTimes'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Issue class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Issu
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getIssue(Container $container): Issu
|
||||
{
|
||||
return new Issu(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Comments class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Comments
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getComments(Container $container): Comments
|
||||
{
|
||||
return new Comments(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Repository Comments class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return RepoComments
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRepoComments(Container $container): RepoComments
|
||||
{
|
||||
return new RepoComments(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Labels class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Labels
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getLabels(Container $container): Labels
|
||||
{
|
||||
return new Labels(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Issue Labels class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return IssueLabels
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getIssueLabels(Container $container): IssueLabels
|
||||
{
|
||||
return new IssueLabels(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Milestones class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Milestones
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMilestones(Container $container): Milestones
|
||||
{
|
||||
return new Milestones(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Reactions class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Reactions
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getReactions(Container $container): Reactions
|
||||
{
|
||||
return new Reactions(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Reactions Comment class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Comment
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getComment(Container $container): Comment
|
||||
{
|
||||
return new Comment(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Stopwatch class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Stopwatch
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getStopwatch(Container $container): Stopwatch
|
||||
{
|
||||
return new Stopwatch(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Subscriptions class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Subscriptions
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getSubscriptions(Container $container): Subscriptions
|
||||
{
|
||||
return new Subscriptions(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Timeline class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Timeline
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTimeline(Container $container): Timeline
|
||||
{
|
||||
return new Timeline(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Times class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Times
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTimes(Container $container): Times
|
||||
{
|
||||
return new Times(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
95
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Jcb.php
Normal file
95
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Jcb.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Utilities\Uri;
|
||||
use VDM\Joomla\Gitea\Utilities\Http;
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Utilities Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Jcb implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Uri::class, 'Gitea.Dynamic.Uri')
|
||||
->share('Gitea.Dynamic.Uri', [$this, 'getUri'], true);
|
||||
|
||||
$container->alias(Http::class, 'Gitea.Utilities.Http')
|
||||
->share('Gitea.Utilities.Http', [$this, 'getHttp'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Dynamic Uri class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Uri
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getUri(Container $container): Uri
|
||||
{
|
||||
// get the global gitea URL
|
||||
$add_gitea_url = Helper::getParams('com_componentbuilder')->get('add_custom_gitea_url', 1);
|
||||
$gitea_url = Helper::getParams('com_componentbuilder')->get('custom_gitea_url');
|
||||
|
||||
// only load this if we have a custom URL set
|
||||
if ($add_gitea_url == 2 && !empty($gitea_url) && strpos($gitea_url, 'http') !== false)
|
||||
{
|
||||
return new Uri($gitea_url);
|
||||
}
|
||||
|
||||
return $container->get('Gitea.Utilities.Uri');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Http class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Http
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getHttp(Container $container): Http
|
||||
{
|
||||
$add_gitea_url = Helper::getParams('com_componentbuilder')->get('add_custom_gitea_url', 1);
|
||||
if ($add_gitea_url == 2)
|
||||
{
|
||||
return new Http(
|
||||
Helper::getParams('com_componentbuilder')->get('custom_gitea_token')
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Http(
|
||||
Helper::getParams('com_componentbuilder')->get('gitea_token')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Miscellaneous\Activitypub;
|
||||
use VDM\Joomla\Gitea\Miscellaneous\Gpg;
|
||||
use VDM\Joomla\Gitea\Miscellaneous\Markdown;
|
||||
use VDM\Joomla\Gitea\Miscellaneous\NodeInfo;
|
||||
use VDM\Joomla\Gitea\Miscellaneous\Version;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Miscellaneous Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Miscellaneous implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Activitypub::class, 'Gitea.Miscellaneous.Activitypub')
|
||||
->share('Gitea.Miscellaneous.Activitypub', [$this, 'getActivitypub'], true);
|
||||
|
||||
$container->alias(Gpg::class, 'Gitea.Miscellaneous.Gpg')
|
||||
->share('Gitea.Miscellaneous.Gpg', [$this, 'getGpg'], true);
|
||||
|
||||
$container->alias(Markdown::class, 'Gitea.Miscellaneous.Markdown')
|
||||
->share('Gitea.Miscellaneous.Markdown', [$this, 'getMarkdown'], true);
|
||||
|
||||
$container->alias(NodeInfo::class, 'Gitea.Miscellaneous.NodeInfo')
|
||||
->share('Gitea.Miscellaneous.NodeInfo', [$this, 'getNodeInfo'], true);
|
||||
|
||||
$container->alias(Version::class, 'Gitea.Miscellaneous.Version')
|
||||
->share('Gitea.Miscellaneous.Version', [$this, 'getVersion'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Activitypub class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Activitypub
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getActivitypub(Container $container): Activitypub
|
||||
{
|
||||
return new Activitypub(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Gpg class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Gpg
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getGpg(Container $container): Gpg
|
||||
{
|
||||
return new Gpg(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Markdown class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Markdown
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMarkdown(Container $container): Markdown
|
||||
{
|
||||
return new Markdown(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the NodeInfo class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return NodeInfo
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getNodeInfo(Container $container): NodeInfo
|
||||
{
|
||||
return new NodeInfo(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Version class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Version
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getVersion(Container $container): Version
|
||||
{
|
||||
return new Version(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Notifications as Notifi;
|
||||
use VDM\Joomla\Gitea\Notifications\Repository;
|
||||
use VDM\Joomla\Gitea\Notifications\Thread;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Notifications Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Notifications implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Notifi::class, 'Gitea.Notifications')
|
||||
->share('Gitea.Notifications', [$this, 'getNotifications'], true);
|
||||
|
||||
$container->alias(Repository::class, 'Gitea.Notifications.Repository')
|
||||
->share('Gitea.Notifications.Repository', [$this, 'getRepository'], true);
|
||||
|
||||
$container->alias(Thread::class, 'Gitea.Notifications.Thread')
|
||||
->share('Gitea.Notifications.Thread', [$this, 'getThread'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Notifications class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Notifi
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getNotifications(Container $container): Notifi
|
||||
{
|
||||
return new Notifi(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Repository class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Repository
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRepository(Container $container): Repository
|
||||
{
|
||||
return new Repository(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Thread class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Thread
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getThread(Container $container): Thread
|
||||
{
|
||||
return new Thread(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Organization as Org;
|
||||
use VDM\Joomla\Gitea\Organization\Hooks;
|
||||
use VDM\Joomla\Gitea\Organization\Labels;
|
||||
use VDM\Joomla\Gitea\Organization\Members;
|
||||
use VDM\Joomla\Gitea\Organization\PublicMembers as PublicMembers;
|
||||
use VDM\Joomla\Gitea\Organization\Repository;
|
||||
use VDM\Joomla\Gitea\Organization\Teams;
|
||||
use VDM\Joomla\Gitea\Organization\Teams\Members as TeamsMembers;
|
||||
use VDM\Joomla\Gitea\Organization\Teams\Repository as TeamsRepository;
|
||||
use VDM\Joomla\Gitea\Organization\User;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Organization Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Organization implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Org::class, 'Gitea.Organization')
|
||||
->share('Gitea.Organization', [$this, 'getOrganization'], true);
|
||||
|
||||
$container->alias(Hooks::class, 'Gitea.Organization.Hooks')
|
||||
->share('Gitea.Organization.Hooks', [$this, 'getHooks'], true);
|
||||
|
||||
$container->alias(Labels::class, 'Gitea.Organization.Labels')
|
||||
->share('Gitea.Organization.Labels', [$this, 'getLabels'], true);
|
||||
|
||||
$container->alias(Members::class, 'Gitea.Organization.Members')
|
||||
->share('Gitea.Organization.Members', [$this, 'getMembers'], true);
|
||||
|
||||
$container->alias(PublicMembers::class, 'Gitea.Organization.Public.Members')
|
||||
->share('Gitea.Organization.Public.Members', [$this, 'getPublicMembers'], true);
|
||||
|
||||
$container->alias(Repository::class, 'Gitea.Organization.Repository')
|
||||
->share('Gitea.Organization.Repository', [$this, 'getRepository'], true);
|
||||
|
||||
$container->alias(Teams::class, 'Gitea.Organization.Teams')
|
||||
->share('Gitea.Organization.Teams', [$this, 'getTeams'], true);
|
||||
|
||||
$container->alias(TeamsMembers::class, 'Gitea.Organization.Teams.Members')
|
||||
->share('Gitea.Organization.Teams.Members', [$this, 'getTeamsMembers'], true);
|
||||
|
||||
$container->alias(TeamsRepository::class, 'Gitea.Organization.Teams.Repository')
|
||||
->share('Gitea.Organization.Teams.Repository', [$this, 'getTeamsRepository'], true);
|
||||
|
||||
$container->alias(User::class, 'Gitea.Organization.User')
|
||||
->share('Gitea.Organization.User', [$this, 'getUser'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Organization class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Org
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getOrganization(Container $container): Org
|
||||
{
|
||||
return new Org(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Hooks class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Hooks
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getHooks(Container $container): Hooks
|
||||
{
|
||||
return new Hooks(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Labels class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Labels
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getLabels(Container $container): Labels
|
||||
{
|
||||
return new Labels(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Members class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Members
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMembers(Container $container): Members
|
||||
{
|
||||
return new Members(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Public Members class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return PublicMembers
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getPublicMembers(Container $container): PublicMembers
|
||||
{
|
||||
return new PublicMembers(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Repository class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Repository
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRepository(Container $container): Repository
|
||||
{
|
||||
return new Repository(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Teams class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Teams
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTeams(Container $container): Teams
|
||||
{
|
||||
return new Teams(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Teams Members class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return TeamsMembers
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTeamsMembers(Container $container): TeamsMembers
|
||||
{
|
||||
return new TeamsMembers(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Teams Repository class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return TeamsRepository
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTeamsRepository(Container $container): TeamsRepository
|
||||
{
|
||||
return new TeamsRepository(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the User class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return User
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getUser(Container $container): User
|
||||
{
|
||||
return new User(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
101
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Package.php
Normal file
101
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Package.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Package as Pack;
|
||||
use VDM\Joomla\Gitea\Package\Files;
|
||||
use VDM\Joomla\Gitea\Package\Owner;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Package Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Package implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Pack::class, 'Gitea.Package')
|
||||
->share('Gitea.Package', [$this, 'getPackage'], true);
|
||||
|
||||
$container->alias(Files::class, 'Gitea.Package.Files')
|
||||
->share('Gitea.Package.Files', [$this, 'getFiles'], true);
|
||||
|
||||
$container->alias(Owner::class, 'Gitea.Package.Owner')
|
||||
->share('Gitea.Package.Owner', [$this, 'getOwner'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Package class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Pack
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getPackage(Container $container): Pack
|
||||
{
|
||||
return new Pack(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Files class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Files
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getFiles(Container $container): Files
|
||||
{
|
||||
return new Files(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Owner class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Owner
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getOwner(Container $container): Owner
|
||||
{
|
||||
return new Owner(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
835
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Repository.php
Normal file
835
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Repository.php
Normal file
@@ -0,0 +1,835 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Repository as Repo;
|
||||
use VDM\Joomla\Gitea\Repository\Archive;
|
||||
use VDM\Joomla\Gitea\Repository\Assignees;
|
||||
use VDM\Joomla\Gitea\Repository\Attachments;
|
||||
use VDM\Joomla\Gitea\Repository\Branch;
|
||||
use VDM\Joomla\Gitea\Repository\Branch\Protection;
|
||||
use VDM\Joomla\Gitea\Repository\Collaborator;
|
||||
use VDM\Joomla\Gitea\Repository\Commits;
|
||||
use VDM\Joomla\Gitea\Repository\Contents;
|
||||
use VDM\Joomla\Gitea\Repository\Forks;
|
||||
use VDM\Joomla\Gitea\Repository\Gpg;
|
||||
use VDM\Joomla\Gitea\Repository\Hooks;
|
||||
use VDM\Joomla\Gitea\Repository\Hooks\Git;
|
||||
use VDM\Joomla\Gitea\Repository\Keys;
|
||||
use VDM\Joomla\Gitea\Repository\Languages;
|
||||
use VDM\Joomla\Gitea\Repository\Media;
|
||||
use VDM\Joomla\Gitea\Repository\Merge;
|
||||
use VDM\Joomla\Gitea\Repository\Mirror;
|
||||
use VDM\Joomla\Gitea\Repository\Mirrors;
|
||||
use VDM\Joomla\Gitea\Repository\Notes;
|
||||
use VDM\Joomla\Gitea\Repository\Patch;
|
||||
use VDM\Joomla\Gitea\Repository\Pulls;
|
||||
use VDM\Joomla\Gitea\Repository\Refs;
|
||||
use VDM\Joomla\Gitea\Repository\Releases;
|
||||
use VDM\Joomla\Gitea\Repository\Remote;
|
||||
use VDM\Joomla\Gitea\Repository\Reviewers;
|
||||
use VDM\Joomla\Gitea\Repository\Reviews;
|
||||
use VDM\Joomla\Gitea\Repository\Stargazers;
|
||||
use VDM\Joomla\Gitea\Repository\Statuses;
|
||||
use VDM\Joomla\Gitea\Repository\Tags;
|
||||
use VDM\Joomla\Gitea\Repository\Teams;
|
||||
use VDM\Joomla\Gitea\Repository\Templates;
|
||||
use VDM\Joomla\Gitea\Repository\Times;
|
||||
use VDM\Joomla\Gitea\Repository\Topics;
|
||||
use VDM\Joomla\Gitea\Repository\Transfer;
|
||||
use VDM\Joomla\Gitea\Repository\Trees;
|
||||
use VDM\Joomla\Gitea\Repository\Watchers;
|
||||
use VDM\Joomla\Gitea\Repository\Wiki;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Repository Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Repository implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Repo::class, 'Gitea.Repository')
|
||||
->share('Gitea.Repository', [$this, 'getRepository'], true);
|
||||
|
||||
$container->alias(Archive::class, 'Gitea.Repository.Archive')
|
||||
->share('Gitea.Repository.Archive', [$this, 'getArchive'], true);
|
||||
|
||||
$container->alias(Assignees::class, 'Gitea.Repository.Assignees')
|
||||
->share('Gitea.Repository.Assignees', [$this, 'getAssignees'], true);
|
||||
|
||||
$container->alias(Attachments::class, 'Gitea.Repository.Attachments')
|
||||
->share('Gitea.Repository.Attachments', [$this, 'getAttachments'], true);
|
||||
|
||||
$container->alias(Branch::class, 'Gitea.Repository.Branch')
|
||||
->share('Gitea.Repository.Branch', [$this, 'getBranch'], true);
|
||||
|
||||
$container->alias(Protection::class, 'Gitea.Repository.Branch.Protection')
|
||||
->share('Gitea.Repository.Branch.Protection', [$this, 'getProtection'], true);
|
||||
|
||||
$container->alias(Collaborator::class, 'Gitea.Repository.Collaborator')
|
||||
->share('Gitea.Repository.Collaborator', [$this, 'getCollaborator'], true);
|
||||
|
||||
$container->alias(Commits::class, 'Gitea.Repository.Commits')
|
||||
->share('Gitea.Repository.Commits', [$this, 'getCommits'], true);
|
||||
|
||||
$container->alias(Contents::class, 'Gitea.Repository.Contents')
|
||||
->share('Gitea.Repository.Contents', [$this, 'getContents'], true);
|
||||
|
||||
$container->alias(Forks::class, 'Gitea.Repository.Forks')
|
||||
->share('Gitea.Repository.Forks', [$this, 'getForks'], true);
|
||||
|
||||
$container->alias(Gpg::class, 'Gitea.Repository.Gpg')
|
||||
->share('Gitea.Repository.Gpg', [$this, 'getGpg'], true);
|
||||
|
||||
$container->alias(Hooks::class, 'Gitea.Repository.Hooks')
|
||||
->share('Gitea.Repository.Hooks', [$this, 'getHooks'], true);
|
||||
|
||||
$container->alias(Git::class, 'Gitea.Repository.Hooks.Git')
|
||||
->share('Gitea.Repository.Hooks.Git', [$this, 'getGit'], true);
|
||||
|
||||
$container->alias(Keys::class, 'Gitea.Repository.Keys')
|
||||
->share('Gitea.Repository.Keys', [$this, 'getKeys'], true);
|
||||
|
||||
$container->alias(Languages::class, 'Gitea.Repository.Languages')
|
||||
->share('Gitea.Repository.Languages', [$this, 'getLanguages'], true);
|
||||
|
||||
$container->alias(Media::class, 'Gitea.Repository.Media')
|
||||
->share('Gitea.Repository.Media', [$this, 'getMedia'], true);
|
||||
|
||||
$container->alias(Merge::class, 'Gitea.Repository.Merge')
|
||||
->share('Gitea.Repository.Merge', [$this, 'getMerge'], true);
|
||||
|
||||
$container->alias(Mirror::class, 'Gitea.Repository.Mirror')
|
||||
->share('Gitea.Repository.Mirror', [$this, 'getMirror'], true);
|
||||
|
||||
$container->alias(Mirrors::class, 'Gitea.Repository.Mirrors')
|
||||
->share('Gitea.Repository.Mirrors', [$this, 'getMirrors'], true);
|
||||
|
||||
$container->alias(Notes::class, 'Gitea.Repository.Notes')
|
||||
->share('Gitea.Repository.Notes', [$this, 'getNotes'], true);
|
||||
|
||||
$container->alias(Patch::class, 'Gitea.Repository.Patch')
|
||||
->share('Gitea.Repository.Patch', [$this, 'getPatch'], true);
|
||||
|
||||
$container->alias(Pulls::class, 'Gitea.Repository.Pulls')
|
||||
->share('Gitea.Repository.Pulls', [$this, 'getPulls'], true);
|
||||
|
||||
$container->alias(Refs::class, 'Gitea.Repository.Refs')
|
||||
->share('Gitea.Repository.Refs', [$this, 'getRefs'], true);
|
||||
|
||||
$container->alias(Releases::class, 'Gitea.Repository.Releases')
|
||||
->share('Gitea.Repository.Releases', [$this, 'getReleases'], true);
|
||||
|
||||
$container->alias(Remote::class, 'Gitea.Repository.Remote')
|
||||
->share('Gitea.Repository.Remote', [$this, 'getRemote'], true);
|
||||
|
||||
$container->alias(Reviewers::class, 'Gitea.Repository.Reviewers')
|
||||
->share('Gitea.Repository.Reviewers', [$this, 'getReviewers'], true);
|
||||
|
||||
$container->alias(Reviews::class, 'Gitea.Repository.Reviews')
|
||||
->share('Gitea.Repository.Reviews', [$this, 'getReviews'], true);
|
||||
|
||||
$container->alias(Stargazers::class, 'Gitea.Repository.Stargazers')
|
||||
->share('Gitea.Repository.Stargazers', [$this, 'getStargazers'], true);
|
||||
|
||||
$container->alias(Statuses::class, 'Gitea.Repository.Statuses')
|
||||
->share('Gitea.Repository.Statuses', [$this, 'getStatuses'], true);
|
||||
|
||||
$container->alias(Tags::class, 'Gitea.Repository.Tags')
|
||||
->share('Gitea.Repository.Tags', [$this, 'getTags'], true);
|
||||
|
||||
$container->alias(Teams::class, 'Gitea.Repository.Teams')
|
||||
->share('Gitea.Repository.Teams', [$this, 'getTeams'], true);
|
||||
|
||||
$container->alias(Templates::class, 'Gitea.Repository.Templates')
|
||||
->share('Gitea.Repository.Templates', [$this, 'getTemplates'], true);
|
||||
|
||||
$container->alias(Times::class, 'Gitea.Repository.Times')
|
||||
->share('Gitea.Repository.Times', [$this, 'getTimes'], true);
|
||||
|
||||
$container->alias(Topics::class, 'Gitea.Repository.Topics')
|
||||
->share('Gitea.Repository.Topics', [$this, 'getTopics'], true);
|
||||
|
||||
$container->alias(Transfer::class, 'Gitea.Repository.Transfer')
|
||||
->share('Gitea.Repository.Transfer', [$this, 'getTransfer'], true);
|
||||
|
||||
$container->alias(Trees::class, 'Gitea.Repository.Trees')
|
||||
->share('Gitea.Repository.Trees', [$this, 'getTrees'], true);
|
||||
|
||||
$container->alias(Watchers::class, 'Gitea.Repository.Watchers')
|
||||
->share('Gitea.Repository.Watchers', [$this, 'getWatchers'], true);
|
||||
|
||||
$container->alias(Wiki::class, 'Gitea.Repository.Wiki')
|
||||
->share('Gitea.Repository.Wiki', [$this, 'getWiki'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Repository class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Repo
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRepository(Container $container): Repo
|
||||
{
|
||||
return new Repo(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Archive class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Archive
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getArchive(Container $container): Archive
|
||||
{
|
||||
return new Archive(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Assignees class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Assignees
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getAssignees(Container $container): Assignees
|
||||
{
|
||||
return new Assignees(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Attachments class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Attachments
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getAttachments(Container $container): Attachments
|
||||
{
|
||||
return new Attachments(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Branch class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Branch
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getBranch(Container $container): Branch
|
||||
{
|
||||
return new Branch(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Branch Protection class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Protection
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getProtection(Container $container): Protection
|
||||
{
|
||||
return new Protection(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Collaborator class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Collaborator
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getCollaborator(Container $container): Collaborator
|
||||
{
|
||||
return new Collaborator(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Commits class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Commits
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getCommits(Container $container): Commits
|
||||
{
|
||||
return new Commits(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Contents class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Contents
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getContents(Container $container): Contents
|
||||
{
|
||||
return new Contents(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Forks class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Forks
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getForks(Container $container): Forks
|
||||
{
|
||||
return new Forks(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Gpg class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Gpg
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getGpg(Container $container): Gpg
|
||||
{
|
||||
return new Gpg(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Hooks class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Hooks
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getHooks(Container $container): Hooks
|
||||
{
|
||||
return new Hooks(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Hooks Git class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Git
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getGit(Container $container): Git
|
||||
{
|
||||
return new Git(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Keys class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Keys
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getKeys(Container $container): Keys
|
||||
{
|
||||
return new Keys(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Languages class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Languages
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getLanguages(Container $container): Languages
|
||||
{
|
||||
return new Languages(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Media class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Media
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMedia(Container $container): Media
|
||||
{
|
||||
return new Media(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Merge class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Merge
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMerge(Container $container): Merge
|
||||
{
|
||||
return new Merge(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Mirror class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Mirror
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMirror(Container $container): Mirror
|
||||
{
|
||||
return new Mirror(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Mirrors class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Mirrors
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getMirrors(Container $container): Mirrors
|
||||
{
|
||||
return new Mirrors(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Notes class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Notes
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getNotes(Container $container): Notes
|
||||
{
|
||||
return new Notes(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Patch class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Patch
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getPatch(Container $container): Patch
|
||||
{
|
||||
return new Patch(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Pulls class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Pulls
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getPulls(Container $container): Pulls
|
||||
{
|
||||
return new Pulls(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Refs class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Refs
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRefs(Container $container): Refs
|
||||
{
|
||||
return new Refs(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Releases class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Releases
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getReleases(Container $container): Releases
|
||||
{
|
||||
return new Releases(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Remote class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Remote
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRemote(Container $container): Remote
|
||||
{
|
||||
return new Remote(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Reviewers class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Reviewers
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getReviewers(Container $container): Reviewers
|
||||
{
|
||||
return new Reviewers(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Reviews class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Reviews
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getReviews(Container $container): Reviews
|
||||
{
|
||||
return new Reviews(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Stargazers class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Stargazers
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getStargazers(Container $container): Stargazers
|
||||
{
|
||||
return new Stargazers(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Statuses class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Statuses
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getStatuses(Container $container): Statuses
|
||||
{
|
||||
return new Statuses(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Tags class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Tags
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTags(Container $container): Tags
|
||||
{
|
||||
return new Tags(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Teams class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Teams
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTeams(Container $container): Teams
|
||||
{
|
||||
return new Teams(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Templates class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Templates
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTemplates(Container $container): Templates
|
||||
{
|
||||
return new Templates(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Times class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Times
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTimes(Container $container): Times
|
||||
{
|
||||
return new Times(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Topics class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Topics
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTopics(Container $container): Topics
|
||||
{
|
||||
return new Topics(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Transfer class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Transfer
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTransfer(Container $container): Transfer
|
||||
{
|
||||
return new Transfer(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Trees class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Trees
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTrees(Container $container): Trees
|
||||
{
|
||||
return new Trees(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Watchers class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Watchers
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getWatchers(Container $container): Watchers
|
||||
{
|
||||
return new Watchers(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Wiki class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Wiki
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getWiki(Container $container): Wiki
|
||||
{
|
||||
return new Wiki(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
123
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Settings.php
Normal file
123
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/Settings.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Settings\Api;
|
||||
use VDM\Joomla\Gitea\Settings\Attachment;
|
||||
use VDM\Joomla\Gitea\Settings\Repository;
|
||||
use VDM\Joomla\Gitea\Settings\Ui;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Settings Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Settings implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Api::class, 'Gitea.Settings.Api')
|
||||
->share('Gitea.Settings.Api', [$this, 'getApi'], true);
|
||||
|
||||
$container->alias(Attachment::class, 'Gitea.Settings.Attachment')
|
||||
->share('Gitea.Settings.Attachment', [$this, 'getAttachment'], true);
|
||||
|
||||
$container->alias(Repository::class, 'Gitea.Settings.Repository')
|
||||
->share('Gitea.Settings.Repository', [$this, 'getRepository'], true);
|
||||
|
||||
$container->alias(Ui::class, 'Gitea.Settings.Ui')
|
||||
->share('Gitea.Settings.Ui', [$this, 'getUi'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Api class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Api
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getApi(Container $container): Api
|
||||
{
|
||||
return new Api(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Attachment class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Attachment
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getAttachment(Container $container): Attachment
|
||||
{
|
||||
return new Attachment(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Repository class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Repository
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRepository(Container $container): Repository
|
||||
{
|
||||
return new Repository(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Ui class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Ui
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getUi(Container $container): Ui
|
||||
{
|
||||
return new Ui(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
332
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/User.php
Normal file
332
libraries/vendor_jcb/VDM.Joomla.Gitea/src/Service/User.php
Normal file
@@ -0,0 +1,332 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\User as Usr;
|
||||
use VDM\Joomla\Gitea\User\Applications;
|
||||
use VDM\Joomla\Gitea\User\Emails;
|
||||
use VDM\Joomla\Gitea\User\Followers;
|
||||
use VDM\Joomla\Gitea\User\Following;
|
||||
use VDM\Joomla\Gitea\User\Gpg;
|
||||
use VDM\Joomla\Gitea\User\Keys;
|
||||
use VDM\Joomla\Gitea\User\Repos;
|
||||
use VDM\Joomla\Gitea\User\Settings;
|
||||
use VDM\Joomla\Gitea\User\Starred;
|
||||
use VDM\Joomla\Gitea\User\Subscriptions;
|
||||
use VDM\Joomla\Gitea\User\Teams;
|
||||
use VDM\Joomla\Gitea\User\Times;
|
||||
use VDM\Joomla\Gitea\User\Tokens;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea User Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class User implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Usr::class, 'Gitea.User')
|
||||
->share('Gitea.User', [$this, 'getUser'], true);
|
||||
|
||||
$container->alias(Applications::class, 'Gitea.User.Applications')
|
||||
->share('Gitea.User.Applications', [$this, 'getApplications'], true);
|
||||
|
||||
$container->alias(Emails::class, 'Gitea.User.Emails')
|
||||
->share('Gitea.User.Emails', [$this, 'getEmails'], true);
|
||||
|
||||
$container->alias(Followers::class, 'Gitea.User.Followers')
|
||||
->share('Gitea.User.Followers', [$this, 'getFollowers'], true);
|
||||
|
||||
$container->alias(Following::class, 'Gitea.User.Following')
|
||||
->share('Gitea.User.Following', [$this, 'getFollowing'], true);
|
||||
|
||||
$container->alias(Gpg::class, 'Gitea.User.Gpg')
|
||||
->share('Gitea.User.Gpg', [$this, 'getGpg'], true);
|
||||
|
||||
$container->alias(Keys::class, 'Gitea.User.Keys')
|
||||
->share('Gitea.User.Keys', [$this, 'getKeys'], true);
|
||||
|
||||
$container->alias(Repos::class, 'Gitea.User.Repos')
|
||||
->share('Gitea.User.Repos', [$this, 'getRepos'], true);
|
||||
|
||||
$container->alias(Settings::class, 'Gitea.User.Settings')
|
||||
->share('Gitea.User.Settings', [$this, 'getSettings'], true);
|
||||
|
||||
$container->alias(Starred::class, 'Gitea.User.Starred')
|
||||
->share('Gitea.User.Starred', [$this, 'getStarred'], true);
|
||||
|
||||
$container->alias(Subscriptions::class, 'Gitea.User.Subscriptions')
|
||||
->share('Gitea.User.Subscriptions', [$this, 'getSubscriptions'], true);
|
||||
|
||||
$container->alias(Teams::class, 'Gitea.User.Teams')
|
||||
->share('Gitea.User.Teams', [$this, 'getTeams'], true);
|
||||
|
||||
$container->alias(Times::class, 'Gitea.User.Times')
|
||||
->share('Gitea.User.Times', [$this, 'getTimes'], true);
|
||||
|
||||
$container->alias(Tokens::class, 'Gitea.User.Tokens')
|
||||
->share('Gitea.User.Tokens', [$this, 'getTokens'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the User class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Usr
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getUser(Container $container): Usr
|
||||
{
|
||||
return new Usr(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Applications class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Applications
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getApplications(Container $container): Applications
|
||||
{
|
||||
return new Applications(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Emails class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Emails
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getEmails(Container $container): Emails
|
||||
{
|
||||
return new Emails(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Followers class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Followers
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getFollowers(Container $container): Followers
|
||||
{
|
||||
return new Followers(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Following class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Following
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getFollowing(Container $container): Following
|
||||
{
|
||||
return new Following(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Gpg class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Gpg
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getGpg(Container $container): Gpg
|
||||
{
|
||||
return new Gpg(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Keys class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Keys
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getKeys(Container $container): Keys
|
||||
{
|
||||
return new Keys(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Repos class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Repos
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getRepos(Container $container): Repos
|
||||
{
|
||||
return new Repos(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Settings class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Settings
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getSettings(Container $container): Settings
|
||||
{
|
||||
return new Settings(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Starred class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Starred
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getStarred(Container $container): Starred
|
||||
{
|
||||
return new Starred(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Subscriptions class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Subscriptions
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getSubscriptions(Container $container): Subscriptions
|
||||
{
|
||||
return new Subscriptions(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Teams class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Teams
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTeams(Container $container): Teams
|
||||
{
|
||||
return new Teams(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Times class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Times
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTimes(Container $container): Times
|
||||
{
|
||||
return new Times(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Tokens class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Tokens
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTokens(Container $container): Tokens
|
||||
{
|
||||
return new Tokens(
|
||||
$container->get('Gitea.Utilities.Http'),
|
||||
$container->get('Gitea.Dynamic.Uri'),
|
||||
$container->get('Gitea.Utilities.Response')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 4th September, 2022
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Gitea\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Gitea\Utilities\Uri;
|
||||
use VDM\Joomla\Gitea\Utilities\Response;
|
||||
|
||||
|
||||
/**
|
||||
* The Gitea Utilities Service
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Utilities implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Uri::class, 'Gitea.Utilities.Uri')
|
||||
->share('Gitea.Utilities.Uri', [$this, 'getUri'], true);
|
||||
|
||||
$container->alias(Response::class, 'Gitea.Utilities.Response')
|
||||
->share('Gitea.Utilities.Response', [$this, 'getResponse'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Uri class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Uri
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getUri(Container $container): Uri
|
||||
{
|
||||
return new Uri();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Response class
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Response
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getResponse(Container $container): Response
|
||||
{
|
||||
return new Response();
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
Reference in New Issue
Block a user