private function buildUri(array $components)
    {
        $uri = new Uri();

        if (isset($components['reg_name'])) {
            $components['host'] = $this->decodeHost($components['host']);
        }

        foreach (array_intersect_key(self::$setters, $components) as $key => $method) {
            $uri = call_user_func([$uri, $method], $components[$key]);
        }

        if (isset($components['userinfo'])) {
            list($username, $password) = preg_split('/:|$/', $components['userinfo'], 2);
            $uri = $uri->withUserInfo(rawurldecode($username), rawurldecode($password));
        }

        return $uri;
    }
private function buildUri(array $components)
    {
        $uri = new Uri();

        if (isset($components['reg_name'])) {
            $components['host'] = $this->decodeHost($components['host']);
        }

        foreach (array_intersect_key(self::$setters, $components) as $key => $method) {
            $uri = call_user_func([$uri, $method], $components[$key]);
        }

        if (isset($components['userinfo'])) {
            list($username, $password) = preg_split('/:|$/', $components['userinfo'], 2);
            $uri = $uri->withUserInfo(rawurldecode($username), rawurldecode($password));
        }

        return $uri;
    }
private function buildUri ( array $ components ) { $ uri = new Uri ( ) ; if ( isset ( $ components [ 'reg_name' ] ) ) { $ components [ 'host' ] = $ this -> decodeHost ( $ components [ 'host' ] ) ; } foreach ( array_intersect_key ( self :: $ setters , $ components ) as $ key => $ method ) { $ uri = call_user_func ( [ $ uri , $ method ] , $ components [ $ key ] ) ; } if ( isset ( $ components [ 'userinfo' ] ) ) { list ( $ username , $ password ) = preg_split ( '/:|$/' , $ components [ 'userinfo' ] , 2 ) ; $ uri = $ uri -> withUserInfo ( rawurldecode ( $ username ) , rawurldecode ( $ password ) ) ; } return $ uri ; }
Builds the Uri instance from the parsed components.
@param array<string, string> $components Components parsed from the URI
@return Uri The constructed URI representation
Builds the Uri instance from the parsed components .