Pocketmine Git client !
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GitClient.php 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. namespace Ad5001\Gitable;
  3. use pocketmine\Server;
  4. use pocketmine\Player;
  5. abstract class GitClient {
  6. protected $main;
  7. private $server;
  8. protected $dir;
  9. public function __construct(Main $main, string $dir) {
  10. $this->main = $main;
  11. $this->server = $main->getServer();
  12. $this->dir = $dir;
  13. }
  14. public abstract function commit(string $message) : string;
  15. public abstract function push(string $to = "github", string $from = "master") : string;
  16. public abstract function undoCommit() : string;
  17. public abstract function checkout($message) : string;
  18. public abstract function branch($message) : string;
  19. public abstract function start() : string;
  20. public abstract function init() : string;
  21. public function getDir() {
  22. return $this->dir;
  23. }
  24. public abstract function cd($path) : string;
  25. public abstract function clone($from) : string;
  26. public abstract function logs() : string;
  27. public abstract function remove($path) : string;
  28. public abstract function move($path) : string;
  29. public abstract function headreset() : string;
  30. public abstract function add($path) : string;
  31. public abstract function diff($path) : string;
  32. public abstract function status($path) : string;
  33. public abstract function remote($name, $url) : string;
  34. public abstract function pull($to = "github", $from = "master") : string;
  35. public abstract function status($path) : string;
  36. }