refactored 80%
[pharext/pharext.org] / app / Github / API / Callback.php
index 04b9ed6f584f25a73e285142c3a70052a891ec5c..0ba38f4debe577839347381dee879173b24e2907 100644 (file)
@@ -8,9 +8,13 @@ abstract class Callback
 {
        protected $api;
        
-       abstract function __invoke($json, $links = null);
+       abstract protected function exec($json, $links = null);
        
        function __construct(API $api) {
                $this->api = $api;
        }
+       
+       function __invoke($result) {
+               return $this->exec(...$result);
+       }
 }