3 namespace app\Github\API\Repos
;
6 use app\Github\API\Callback
;
8 class ContentsCallback
extends Callback
12 function __construct(API
$api, $repo) {
13 parent
::__construct($api);
17 function __invoke($json, $links = null) {
18 foreach ($json as $entry) {
19 if ($entry->type
!== "file" ||
$entry->size
<= 0) {
22 if ($entry->name
=== "config.m4" ||
fnmatch("config?.m4", $entry->name
)) {
23 $this->repo
->config_m4
= $entry->name
;
24 } elseif ($entry->name
=== "package.xml" ||
$entry->name
=== "package2.xml") {
25 $this->repo
->package_xml
= $entry->name
;
26 } elseif ($entry->name
=== "pharext_package.php") {
27 $this->repo
->pharext_package_php
= $entry->name
;