| 1 | <?php |
||
| 8 | abstract class GitHandler |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Handles git URLs. |
||
| 13 | * |
||
| 14 | * @param $git_url |
||
| 15 | * |
||
| 16 | * @return array |
||
| 17 | */ |
||
| 18 | public static function handle($git_url) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Get files from a given git repository and branch (optional). |
||
| 28 | * |
||
| 29 | * @param $url |
||
| 30 | * @param string $branch |
||
| 31 | * |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | private static function getFilesFromGitRepository($url, $branch = '') |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Clones a git repository. |
||
| 42 | * |
||
| 43 | * @param $url |
||
| 44 | * @param string $branch |
||
| 45 | * |
||
| 46 | * @return Repository |
||
| 47 | */ |
||
| 48 | private static function cloneGitRepository($url, $branch = '') |
||
| 62 | } |
||
| 63 |