[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/Requests/ -> IRI.php (summary)

IRI parser/serialiser/normaliser

File Size: 1086 lines (29 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Requests_IRI:: (27 methods):
  __toString()
  __set()
  __get()
  __isset()
  __unset()
  __construct()
  absolutize()
  parse_iri()
  remove_dot_segments()
  replace_invalid_with_pct_encoding()
  remove_iunreserved_percent_encoded()
  scheme_normalization()
  is_valid()
  set_iri()
  set_scheme()
  set_authority()
  set_userinfo()
  set_host()
  set_port()
  set_path()
  set_query()
  set_fragment()
  to_uri()
  get_iri()
  get_uri()
  get_iauthority()
  get_authority()


Class: Requests_IRI  - X-Ref

IRI parser/serialiser/normaliser

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.

__toString()   X-Ref
Return the entire IRI when you try and read the object as a string

return: string

__set($name, $value)   X-Ref
Overload __set() to provide access via properties

param: string $name Property name
param: mixed $value Property value

__get($name)   X-Ref
Overload __get() to provide access via properties

return: mixed
param: string $name Property name

__isset($name)   X-Ref
Overload __isset() to provide access via properties

return: bool
param: string $name Property name

__unset($name)   X-Ref
Overload __unset() to provide access via properties

param: string $name Property name

__construct($iri = null)   X-Ref
Create a new IRI object, from a specified string

param: string|null $iri

absolutize($base, $relative)   X-Ref
Create a new IRI object by resolving a relative IRI

Returns false if $base is not absolute, otherwise an IRI.

return: Requests_IRI|false
param: Requests_IRI|string $base (Absolute) Base IRI
param: Requests_IRI|string $relative Relative IRI

parse_iri($iri)   X-Ref
Parse an IRI into scheme/authority/path/query/fragment segments

return: array
param: string $iri

remove_dot_segments($input)   X-Ref
Remove dot segments from a path

return: string
param: string $input

replace_invalid_with_pct_encoding($string, $extra_chars, $iprivate = false)   X-Ref
Replace invalid character with percent encoding

return: string
param: string $string Input string
param: string $extra_chars Valid characters not in iunreserved or
param: bool $iprivate Allow iprivate

remove_iunreserved_percent_encoded($match)   X-Ref
Callback function for preg_replace_callback.

Removes sequences of percent encoded bytes that represent UTF-8
encoded characters in iunreserved

return: string Replacement
param: array $match PCRE match

scheme_normalization()   X-Ref
No description

is_valid()   X-Ref
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: bool

set_iri($iri)   X-Ref
Set the entire IRI. Returns true on success, false on failure (if there
are any invalid characters).

return: bool
param: string $iri

set_scheme($scheme)   X-Ref
Set the scheme. Returns true on success, false on failure (if there are
any invalid characters).

return: bool
param: string $scheme

set_authority($authority)   X-Ref
Set the authority. Returns true on success, false on failure (if there are
any invalid characters).

return: bool
param: string $authority

set_userinfo($iuserinfo)   X-Ref
Set the iuserinfo.

return: bool
param: string $iuserinfo

set_host($ihost)   X-Ref
Set the ihost. Returns true on success, false on failure (if there are
any invalid characters).

return: bool
param: string $ihost

set_port($port)   X-Ref
Set the port. Returns true on success, false on failure (if there are
any invalid characters).

return: bool
param: string $port

set_path($ipath)   X-Ref
Set the ipath.

return: bool
param: string $ipath

set_query($iquery)   X-Ref
Set the iquery.

return: bool
param: string $iquery

set_fragment($ifragment)   X-Ref
Set the ifragment.

return: bool
param: string $ifragment

to_uri($string)   X-Ref
Convert an IRI to a URI (or parts thereof)

return: string|false URI if IRI is valid, false otherwise.
param: string|bool IRI to convert (or false from {@see get_iri})

get_iri()   X-Ref
Get the complete IRI

return: string|false

get_uri()   X-Ref
Get the complete URI

return: string

get_iauthority()   X-Ref
Get the complete iauthority

return: string|null

get_authority()   X-Ref
Get the complete authority

return: string



Generated: Thu Dec 15 01:00:02 2022 Cross-referenced by PHPXref 0.7.1