7 * Contains error message when parse() failed
14 * Array with keys (URL title) and values (arrays of urls)
15 * Only supported URLs are included.
23 public function __construct($url)
25 $this->url = trim($url);
28 public function parse()
30 $hp = new HtmlParser();
31 $ret = $hp->extractGitUrls($this->url);
32 $this->arGitUrls = $hp->getGitUrls();
33 $this->error = $hp->error;
39 * Iterate through all git urls and return one if there is only
42 * @return mixed Boolean false or array with keys "url" and "title"
44 public function getUniqueGitUrl()
47 foreach ($this->arGitUrls as $title => $arUrls) {
48 foreach ($arUrls as $url) {
50 $uniqueUrl = array('url' => $url, 'title' => $title);
60 public function getGitUrls()
62 return $this->arGitUrls;
66 * Get the URL from which the git URL was derived, often
71 public function getUrl()
76 public function setUrl($url)