X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/dca6d8d7b6bb61f303c17905dde4ecbde7ff1da5..63575a005e8e2386abb24e97791e18d61e6350fe:/src/phorkie/ForkRemote.php diff --git a/src/phorkie/ForkRemote.php b/src/phorkie/ForkRemote.php new file mode 100644 index 0000000..f3639b2 --- /dev/null +++ b/src/phorkie/ForkRemote.php @@ -0,0 +1,42 @@ +url = $url; + } + + public function parse() + { + $scheme = parse_url($this->url, PHP_URL_SCHEME); + switch ($scheme) { + case 'git': + //clearly a git url + $this->gitUrl = $this->url; + return true; + + case 'ssh': + //FIXME: maybe loosen this when we know how to skip the + //"do you trust this server" question of ssh + $this->error = 'ssh:// URLs are not supported'; + return false; + + case 'http': + case 'https': + return $this->extractUrlsFromHtml($this->url); + } + + $this->error = 'Unknown URLs scheme: ' . $scheme; + return false; + } + + protected function extractUrlsFromHtml($url) + { + } +} + +?>