Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion cPanelApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -539,4 +555,4 @@ private function exe_cpanel($func = '') {

}

?>
?>