-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.power
More file actions
150 lines (137 loc) · 3.78 KB
/
code.power
File metadata and controls
150 lines (137 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/**
* 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')
);
}