yet another github api refactoring
[pharext/pharext.org] / app / Github / API / Hooks / HooksCallback.php
diff --git a/app/Github/API/Hooks/HooksCallback.php b/app/Github/API/Hooks/HooksCallback.php
new file mode 100644 (file)
index 0000000..f520844
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+namespace app\Github\API\Hooks;
+
+use app\Github\API;
+use app\Github\API\Callback;
+
+class HooksCallback extends Callback
+{
+       private $repo;
+       
+       function __construct(API $api, $repo) {
+               parent::__construct($api);
+               $this->repo = $repo;
+       }
+       
+       function __invoke($json, $links = null) {
+               $this->repo->hooks = $json;
+       }
+}