public function getMainUrl($url)
    {
        $social  = $this->getSocialNetworkFromDomain($url);
        foreach ($this->getDefinitions() as $domain => $name) {

            if ($name == $social) {

                return $domain;
            }
        }
        return $url;
    }
public function getMainUrl($url)
    {
        $social  = $this->getSocialNetworkFromDomain($url);
        foreach ($this->getDefinitions() as $domain => $name) {

            if ($name == $social) {

                return $domain;
            }
        }
        return $url;
    }
public function getMainUrl ( $ url ) { $ social = $ this -> getSocialNetworkFromDomain ( $ url ) ; foreach ( $ this -> getDefinitions ( ) as $ domain => $ name ) { if ( $ name == $ social ) { return $ domain ; } } return $ url ; }
Returns the main url of the social network the given url matches

@param string  $url

@return string
Returns the main url of the social network the given url matches