7918e2df620a4152555ea9b0bd00bac740e775c0
[pharext/pharext.org] / Index.php
1 <?php
2
3 namespace app\Controller\Github;
4
5 use app\Controller\Github;
6 use app\Github\API\Repos\ReposCallback;
7
8 class Index extends Github
9 {
10 function __invoke(array $args = null) {
11 if ($this->checkToken()) {
12 $this->github->listRepos(
13 $this->app->getRequest()->getQuery("page")
14 )->then(
15 new ReposCallback($this->github)
16 )->done(function($results) {
17 list(list($repos, $links)) = $results;
18 $this->app->display("github/index", compact("repos", "links"));
19 });
20 $this->github->drain();
21 }
22 }
23 }