public function url($url)
    {
        if (filter_var($url, FILTER_VALIDATE_URL) !== false) {
            return $url;
        }

        if (is_string($url)) {
            return $this->parseStringUrl($url);
        }

        if (is_array($url)) {
            return $this->make(new UrlSettings($url));
        }

        if ($url instanceof UrlSettings) {
            return $this->make($url);
        }

        throw new \InvalidArgumentException('Settings is not a supported type');
    }
public function url($url)
    {
        if (filter_var($url, FILTER_VALIDATE_URL) !== false) {
            return $url;
        }

        if (is_string($url)) {
            return $this->parseStringUrl($url);
        }

        if (is_array($url)) {
            return $this->make(new UrlSettings($url));
        }

        if ($url instanceof UrlSettings) {
            return $this->make($url);
        }

        throw new \InvalidArgumentException('Settings is not a supported type');
    }
public function url ( $ url ) { if ( filter_var ( $ url , FILTER_VALIDATE_URL ) !== false ) { return $ url ; } if ( is_string ( $ url ) ) { return $ this -> parseStringUrl ( $ url ) ; } if ( is_array ( $ url ) ) { return $ this -> make ( new UrlSettings ( $ url ) ) ; } if ( $ url instanceof UrlSettings ) { return $ this -> make ( $ url ) ; } throw new \ InvalidArgumentException ( 'Settings is not a supported type' ) ; }
Create a url from variable type

@param $url
@return null|string|array
Create a url from variable type