IRI parser/serialiser/normaliser.
More...
|
static | absolutize ($base, $relative) |
| Create a new IRI object by resolving a relative IRI.
|
|
|
string | $ifragment = null |
| ifragment
|
|
string | $ihost = null |
| ihost
|
|
string | $ipath = '' |
| ipath
|
|
string | $iquery = null |
| iquery
|
|
string | $iuserinfo = null |
| User Information.
|
|
| $normalization |
| Normalization database.
|
|
string | $port = null |
| Port.
|
|
string | $scheme = null |
| Scheme.
|
|
IRI parser/serialiser/normaliser.
@subpackage HTTP
- Author
- Sam Sneddon
-
Steve Minutillo
-
Ryan McCue
- Copyright
- 2007-2012 Sam Sneddon, Steve Minutillo, Ryan McCue
- License
- http://www.opensource.org/licenses/bsd-license.php
◆ __construct()
IRI::__construct |
( |
| $iri = null | ) |
|
Create a new IRI object, from a specified string.
- Parameters
-
◆ __get()
Overload __get() to provide access via properties.
- Parameters
-
- Return values
-
◆ __isset()
Overload __isset() to provide access via properties.
- Parameters
-
- Return values
-
◆ __set()
IRI::__set |
( |
| $name, |
|
|
| $value ) |
Overload __set() to provide access via properties.
- Parameters
-
string | $name | Property name |
mixed | $value | Property value |
◆ __toString()
Return the entire IRI when you try and read the object as a string.
- Return values
-
◆ __unset()
Overload __unset() to provide access via properties.
- Parameters
-
◆ absolutize()
static IRI::absolutize |
( |
| $base, |
|
|
| $relative ) |
|
static |
Create a new IRI object by resolving a relative IRI.
Returns false if $base is not absolute, otherwise an IRI.
- Parameters
-
- Return values
-
◆ get_authority()
Get the complete authority.
- Return values
-
◆ get_iauthority()
Get the complete iauthority.
- Return values
-
◆ get_iri()
Get the complete IRI.
- Return values
-
◆ get_uri()
Get the complete URI.
- Return values
-
◆ 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.
- Return values
-
◆ parse_iri()
Parse an IRI into scheme/authority/path/query/fragment segments.
- Parameters
-
- Return values
-
◆ remove_dot_segments()
IRI::remove_dot_segments |
( |
| $input | ) |
|
|
protected |
Remove dot segments from a path.
- Parameters
-
- Return values
-
◆ remove_iunreserved_percent_encoded()
IRI::remove_iunreserved_percent_encoded |
( |
| $match | ) |
|
|
protected |
Callback function for preg_replace_callback.
Removes sequences of percent encoded bytes that represent UTF-8 encoded characters in iunreserved
- Parameters
-
- Return values
-
◆ replace_invalid_with_pct_encoding()
IRI::replace_invalid_with_pct_encoding |
( |
| $string, |
|
|
| $extra_chars, |
|
|
| $iprivate = false ) |
|
protected |
Replace invalid character with percent encoding.
- Parameters
-
string | $string | Input string |
string | $extra_chars | Valid characters not in iunreserved or iprivate (this is ASCII-only) |
bool | $iprivate | Allow iprivate |
- Return values
-
◆ set_authority()
IRI::set_authority |
( |
| $authority, |
|
|
| $clear_cache = false ) |
Set the authority.
Returns true on success, false on failure (if there are any invalid characters).
- Parameters
-
- Return values
-
◆ set_fragment()
IRI::set_fragment |
( |
| $ifragment | ) |
|
Set the ifragment.
- Parameters
-
- Return values
-
◆ set_host()
Set the ihost.
Returns true on success, false on failure (if there are any invalid characters).
- Parameters
-
- Return values
-
◆ set_iri()
IRI::set_iri |
( |
| $iri, |
|
|
| $clear_cache = false ) |
Set the entire IRI.
Returns true on success, false on failure (if there are any invalid characters).
- Parameters
-
- Return values
-
◆ set_path()
IRI::set_path |
( |
| $ipath, |
|
|
| $clear_cache = false ) |
Set the ipath.
- Parameters
-
- Return values
-
◆ set_port()
Set the port.
Returns true on success, false on failure (if there are any invalid characters).
- Parameters
-
- Return values
-
◆ set_query()
IRI::set_query |
( |
| $iquery | ) |
|
Set the iquery.
- Parameters
-
- Return values
-
◆ set_scheme()
IRI::set_scheme |
( |
| $scheme | ) |
|
Set the scheme.
Returns true on success, false on failure (if there are any invalid characters).
- Parameters
-
- Return values
-
◆ set_userinfo()
IRI::set_userinfo |
( |
| $iuserinfo | ) |
|
Set the iuserinfo.
- Parameters
-
- Return values
-
◆ to_uri()
Convert an IRI to a URI (or parts thereof)
- Return values
-
◆ $normalization
Initial value:= [
'acap' => [
'port' => 674
],
'dict' => [
'port' => 2628
],
'file' => [
'ihost' => 'localhost'
],
'http' => [
'port' => 80,
'ipath' => '/'
],
'https' => [
'port' => 443,
'ipath' => '/'
],
]
Normalization database.
Each key is the scheme, each value is an array with each key as the IRI part and value as the default value for that part.
The documentation for this class was generated from the following file:
- lib/simplepie/src/IRI.php