Title: Psr17Factory::createUri
Published: May 20, 2026
Last modified: August 20, 2026

---

# Psr17Factory::createUri( $uri = ” )

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/wordpress-aiclientdependencies-nyholm-psr7-factory-psr17factory/createuri/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wordpress-aiclientdependencies-nyholm-psr7-factory-psr17factory/createuri/?output_format=md#related)

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wordpress-aiclientdependencies-nyholm-psr7-factory-psr17factory/createuri/?output_format=md#source)󠁿

    ```php
    public function createUri(string $uri = ''): UriInterface
    {
        return new Uri($uri);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/php-ai-client/third-party/nyholm/psr7/factory/psr17factory.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/php-ai-client/third-party/Nyholm/Psr7/Factory/Psr17Factory.php#L72)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/php-ai-client/third-party/Nyholm/Psr7/Factory/Psr17Factory.php#L72-L75)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wordpress-aiclientdependencies-nyholm-psr7-factory-psr17factory/createuri/?output_format=md#related)󠁿

| Uses | Description | 
| [Uri::__construct()](https://developer.wordpress.org/reference/classes/wordpress-aiclientdependencies-nyholm-psr7-uri/__construct/)`wp-includes/php-ai-client/third-party/Nyholm/Psr7/Uri.php` |  |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwordpress-aiclientdependencies-nyholm-psr7-factory-psr17factory%2Fcreateuri%2F)
before being able to contribute a note or feedback.