public static function createFromArray(array $arr)
    {
        $ret = new Url;
        $keys = ['scheme','user','pass','host','port','path','query','fragment'];
        foreach ($keys as $key) {
            if (array_key_exists($key, $arr)) {
                $fn = 'set'.ucfirst($key);
                call_user_func([$ret, $fn], $arr[$key]);
            }
        }
        return $ret;
    }
public static function createFromArray(array $arr)
    {
        $ret = new Url;
        $keys = ['scheme','user','pass','host','port','path','query','fragment'];
        foreach ($keys as $key) {
            if (array_key_exists($key, $arr)) {
                $fn = 'set'.ucfirst($key);
                call_user_func([$ret, $fn], $arr[$key]);
            }
        }
        return $ret;
    }
public static function createFromArray ( array $ arr ) { $ ret = new Url ; $ keys = [ 'scheme' , 'user' , 'pass' , 'host' , 'port' , 'path' , 'query' , 'fragment' ] ; foreach ( $ keys as $ key ) { if ( array_key_exists ( $ key , $ arr ) ) { $ fn = 'set' . ucfirst ( $ key ) ; call_user_func ( [ $ ret , $ fn ] , $ arr [ $ key ] ) ; } } return $ ret ; }
Create a url instance given an array of url properties and values

@param array $arr
@return \sndsgd\Url
Create a url instance given an array of url properties and values