diff --git a/cPanelApi.php b/cPanelApi.php index 61f2be6..aedf6b5 100644 --- a/cPanelApi.php +++ b/cPanelApi.php @@ -9,6 +9,22 @@ public function __construct($cpanelUrl, $cpaneluser, $cpanelPwd, $cpanelPort = ' $this->cPanelPort = $cpanelPort; } + /////////////// Git Repo Management ////////////////// + + public function listGitRepo() + { + $func = "https://$this->cPanelUrl:$this->cPanelPort/execute/VersionControl/retrieve"; + return $this->exe_cpanel($func); + } + + + public function createGitRepo($name,$repository_root,$repoURL) + { + $func = "https://$this->cPanelUrl:$this->cPanelPort/execute/VersionControl/create?type=git&name=$name&repository_root=$repository_root&source_repository={\"remote_name\":\"origin\",\"url\":\"$repoURL\"}"; + return $this->exe_cpanel($func); + } + + /////////////// MYSQL CPANEL ////////////////// public function createDataBaseMySQL($database) { @@ -539,4 +555,4 @@ private function exe_cpanel($func = '') { } -?> \ No newline at end of file +?>