Title: Requests_IRI
Published: August 16, 2016
Last modified: November 2, 2022

---

# class Requests_IRI {}

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/requests_iri/?output_format=md#description)
 * [Methods](https://developer.wordpress.org/reference/classes/requests_iri/?output_format=md#methods)
 * [Source](https://developer.wordpress.org/reference/classes/requests_iri/?output_format=md#source)

[ Back to top](https://developer.wordpress.org/reference/classes/requests_iri/?output_format=md#wp--skip-link--target)

IRI parser/serialiser/normaliser

## 󠀁[Description](https://developer.wordpress.org/reference/classes/requests_iri/?output_format=md#description)󠁿

Copyright (c) 2007-2010, Geoffrey Sneddon and Steve Minutillo.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list
   of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this
   list of conditions and the following disclaimer in the documentation and/or other
   materials provided with the distribution.
 * Neither the name of the SimplePie Team nor the names of its contributors may 
   be used to endorse or promote products derived from this software without specific
   prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

## 󠀁[Methods](https://developer.wordpress.org/reference/classes/requests_iri/?output_format=md#methods)󠁿

| Name | Description | 
| [Requests_IRI::__construct](https://developer.wordpress.org/reference/classes/requests_iri/__construct/) | Create a new IRI object, from a specified string | 
| [Requests_IRI::__get](https://developer.wordpress.org/reference/classes/requests_iri/__get/) | Overload __get() to provide access via properties | 
| [Requests_IRI::__isset](https://developer.wordpress.org/reference/classes/requests_iri/__isset/) | Overload __isset() to provide access via properties | 
| [Requests_IRI::__set](https://developer.wordpress.org/reference/classes/requests_iri/__set/) | Overload __set() to provide access via properties | 
| [Requests_IRI::__toString](https://developer.wordpress.org/reference/classes/requests_iri/__tostring/) | Return the entire IRI when you try and read the object as a string | 
| [Requests_IRI::__unset](https://developer.wordpress.org/reference/classes/requests_iri/__unset/) | Overload __unset() to provide access via properties | 
| [Requests_IRI::absolutize](https://developer.wordpress.org/reference/classes/requests_iri/absolutize/) | Create a new IRI object by resolving a relative IRI | 
| [Requests_IRI::get_authority](https://developer.wordpress.org/reference/classes/requests_iri/get_authority/) | Get the complete authority | 
| [Requests_IRI::get_iauthority](https://developer.wordpress.org/reference/classes/requests_iri/get_iauthority/) | Get the complete iauthority | 
| [Requests_IRI::get_iri](https://developer.wordpress.org/reference/classes/requests_iri/get_iri/) | Get the complete IRI | 
| [Requests_IRI::get_uri](https://developer.wordpress.org/reference/classes/requests_iri/get_uri/) | Get the complete URI | 
| [Requests_IRI::is_valid](https://developer.wordpress.org/reference/classes/requests_iri/is_valid/) | Check if the object represents a valid IRI. This needs to be done on each call as some things change depending on another part of the IRI. | 
| [Requests_IRI::parse_iri](https://developer.wordpress.org/reference/classes/requests_iri/parse_iri/) | Parse an IRI into scheme/authority/path/query/fragment segments | 
| [Requests_IRI::remove_dot_segments](https://developer.wordpress.org/reference/classes/requests_iri/remove_dot_segments/) | Remove dot segments from a path | 
| [Requests_IRI::remove_iunreserved_percent_encoded](https://developer.wordpress.org/reference/classes/requests_iri/remove_iunreserved_percent_encoded/) | Callback function for preg_replace_callback. | 
| [Requests_IRI::replace_invalid_with_pct_encoding](https://developer.wordpress.org/reference/classes/requests_iri/replace_invalid_with_pct_encoding/) | Replace invalid character with percent encoding | 
| [Requests_IRI::scheme_normalization](https://developer.wordpress.org/reference/classes/requests_iri/scheme_normalization/) | – | 
| [Requests_IRI::set_authority](https://developer.wordpress.org/reference/classes/requests_iri/set_authority/) | Set the authority. Returns true on success, false on failure (if there are any invalid characters). | 
| [Requests_IRI::set_fragment](https://developer.wordpress.org/reference/classes/requests_iri/set_fragment/) | Set the ifragment. | 
| [Requests_IRI::set_host](https://developer.wordpress.org/reference/classes/requests_iri/set_host/) | Set the ihost. Returns true on success, false on failure (if there are any invalid characters). | 
| [Requests_IRI::set_iri](https://developer.wordpress.org/reference/classes/requests_iri/set_iri/) | Set the entire IRI. Returns true on success, false on failure (if there are any invalid characters). | 
| [Requests_IRI::set_path](https://developer.wordpress.org/reference/classes/requests_iri/set_path/) | Set the ipath. | 
| [Requests_IRI::set_port](https://developer.wordpress.org/reference/classes/requests_iri/set_port/) | Set the port. Returns true on success, false on failure (if there are any invalid characters). | 
| [Requests_IRI::set_query](https://developer.wordpress.org/reference/classes/requests_iri/set_query/) | Set the iquery. | 
| [Requests_IRI::set_scheme](https://developer.wordpress.org/reference/classes/requests_iri/set_scheme/) | Set the scheme. Returns true on success, false on failure (if there are any invalid characters). | 
| [Requests_IRI::set_userinfo](https://developer.wordpress.org/reference/classes/requests_iri/set_userinfo/) | Set the iuserinfo. | 
| [Requests_IRI::to_uri](https://developer.wordpress.org/reference/classes/requests_iri/to_uri/) | Convert an IRI to a URI (or parts thereof) |

## 󠀁[Source](https://developer.wordpress.org/reference/classes/requests_iri/?output_format=md#source)󠁿

[View all references](https://developer.wordpress.org/reference/files/wp-includes/requests/iri.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/Requests/IRI.php#L66)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Frequests_iri%2F)
before being able to contribute a note or feedback.