-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.power
More file actions
770 lines (695 loc) · 19.2 KB
/
Copy pathcode.power
File metadata and controls
770 lines (695 loc) · 19.2 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
/**
* 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')
);
}