# GenericUri Class Reference
[Internet standarts implementations]

Inheritance diagram for GenericUri:
[legend]

List of all members.

## Public Member Functions

| parse ($uri, $guessClass=false)
| transform (GenericUri $reference, $strict=true)
| getKnownSubSchemes ()
| setScheme ($scheme)
| getScheme ()
| setUserInfo ($userInfo)
| getUserInfo ()
| setHost ($host)
| getHost ()
| setPort ($port)
| getPort ()
| setPath ($path)
| getPath ()
| setQuery ($query)
| appendQuery ($string, $separator= '&')
| getQuery ()
| setFragment ($fragment)
| getFragment ()
| setAuthority ($authority)
| getAuthority ()
| setSchemeSpecificPart ($schemeSpecificPart)
| getSchemeSpecificPart ()
| toString ()
| toStringFromRoot ()
| isValid ()
| isValidScheme ()
| isValidUserInfo ()
| isValidHost ()
| isValidPort ()
| isValidPath ()
| isValidQuery ()
| isValidFragment ()
| isAbsolute ()
| isRelative ()
| normalize ()

## Static Public Member Functions

static | create ()

## Public Attributes

const | CHARS_UNRESERVED = 'a-z0-9-._~'
const | CHARS_SUBDELIMS = '!$&\'()*+,;='
const | PATTERN_PCTENCODED = '%[0-9a-f][0-9a-f]'

## Protected Member Functions

| isValidHostName ()
| charPattern ($extraChars=null, $pctEncodedPattern=true)
| userInfoCharPattern ($pctEncoded=true)
| hostNameCharPattern ($pctEncoded=true)
| segmentCharPattern ($pctEncoded=true)
| fragmentOrQueryCharPattern ($pctEncoded=true)

## Protected Attributes

| $scheme = null
| $userInfo = null
| $host = null
| $port = null
| $path = null
| $query = null
| $fragment = null

## Private Member Functions

| isValidFragmentOrQuery ($string)
| mergePath ($path)
| normalizePercentEncoded ($string, $unreservedPartChars)

## Static Private Member Functions

static | removeDotSegments ($path)

## Detailed Description

See also:
  http://tools.ietf.org/html/rfc3986

Todo:
  comparsion

Definition at line 17 of file GenericUri.class.php.

## Member Function Documentation

GenericUri::appendQuery | ( | $ | string,
|  | $ | separator = `'&'` |
| ) |  |  |

Returns:
  GenericUri

Definition at line 270 of file GenericUri.class.php.

References $query, and setQuery().

Here is the call graph for this function:

GenericUri::charPattern | ( | $ | extraChars = `null`,
|  | $ | pctEncodedPattern = `true` |
| ) |  |  | `[protected]`

Definition at line 572 of file GenericUri.class.php.

Referenced by fragmentOrQueryCharPattern(), hostNameCharPattern(), HttpUrl::isValidHostName(), segmentCharPattern(), and userInfoCharPattern().

static GenericUri::create | ( |  | ) | `[static]`

Returns:
  GenericUri

Reimplemented in HttpUrl, Url, and Urn.

Definition at line 36 of file GenericUri.class.php.

Referenced by DirectoryToObjectBinder::getRealObject(), and TextUtils::normalizeUri().

GenericUri::fragmentOrQueryCharPattern | ( | $ | pctEncoded = `true` | ) | `[protected]`

Definition at line 603 of file GenericUri.class.php.

References charPattern().

Referenced by isValidFragmentOrQuery(), and normalize().

Here is the call graph for this function:

GenericUri::getAuthority | ( |  | ) |

Definition at line 332 of file GenericUri.class.php.

Referenced by HttpUrl::ensureAbsolute(), Url::fixAuthorityFromPath(), Url::fixMistakenPath(), getSchemeSpecificPart(), Urn::isValid(), Url::isValid(), isValidPath(), mergePath(), Url::toSmallString(), and transform().

GenericUri::getFragment | ( |  | ) |

Definition at line 299 of file GenericUri.class.php.

Referenced by normalize(), and transform().

GenericUri::getHost | ( |  | ) |

Definition at line 222 of file GenericUri.class.php.

Referenced by normalize(), and transform().

GenericUri::getKnownSubSchemes | ( |  | ) |

Reimplemented in Url, and Urn.

Definition at line 174 of file GenericUri.class.php.

References Url::create(), and Urn::create().

Referenced by parse().

Here is the call graph for this function:

GenericUri::getPath | ( |  | ) |

Definition at line 252 of file GenericUri.class.php.

Referenced by mergePath(), HttpUrl::normalize(), normalize(), and transform().

GenericUri::getPort | ( |  | ) |

Definition at line 237 of file GenericUri.class.php.

Referenced by Url::normalize(), HttpUrl::normalize(), and transform().

GenericUri::getQuery | ( |  | ) |

Definition at line 284 of file GenericUri.class.php.

Referenced by normalize(), and transform().

GenericUri::getScheme | ( |  | ) |

Definition at line 192 of file GenericUri.class.php.

Referenced by HttpUrl::normalize(), normalize(), and transform().

GenericUri::getSchemeSpecificPart | ( |  | ) |

Definition at line 353 of file GenericUri.class.php.

References getAuthority().

Referenced by toString().

Here is the call graph for this function:

GenericUri::getUserInfo | ( |  | ) |

Definition at line 207 of file GenericUri.class.php.

Referenced by normalize(), and transform().

GenericUri::hostNameCharPattern | ( | $ | pctEncoded = `true` | ) | `[protected]`

Definition at line 593 of file GenericUri.class.php.

References charPattern().

Referenced by isValidHostName(), and normalize().

Here is the call graph for this function:

GenericUri::isAbsolute | ( |  | ) |

Definition at line 550 of file GenericUri.class.php.

Referenced by Url::isValid().

GenericUri::isRelative | ( |  | ) |

Definition at line 555 of file GenericUri.class.php.

Referenced by Url::isValid().

GenericUri::isValid | ( |  | ) |

Reimplemented in Url, and Urn.

Definition at line 398 of file GenericUri.class.php.

References isValidFragment(), isValidHost(), isValidPath(), isValidPort(), isValidQuery(), isValidScheme(), and isValidUserInfo().

Here is the call graph for this function:

GenericUri::isValidFragment | ( |  | ) |

Definition at line 544 of file GenericUri.class.php.

References isValidFragmentOrQuery().

Referenced by isValid().

Here is the call graph for this function:

GenericUri::isValidFragmentOrQuery | ( | $ | string | ) | `[private]`

Definition at line 608 of file GenericUri.class.php.

References fragmentOrQueryCharPattern().

Referenced by isValidFragment(), and isValidQuery().

Here is the call graph for this function:

GenericUri::isValidHost | ( |  | ) |

Definition at line 430 of file GenericUri.class.php.

References isValidHostName().

Referenced by isValid().

Here is the call graph for this function:

GenericUri::isValidHostName | ( |  | ) | `[protected]`

Reimplemented in HttpUrl.

Definition at line 560 of file GenericUri.class.php.

References hostNameCharPattern().

Referenced by isValidHost().

Here is the call graph for this function:

GenericUri::isValidPath | ( |  | ) |

Definition at line 494 of file GenericUri.class.php.

References getAuthority(), and segmentCharPattern().

Referenced by isValid().

Here is the call graph for this function:

GenericUri::isValidPort | ( |  | ) |

Reimplemented in HttpUrl.

Definition at line 482 of file GenericUri.class.php.

Referenced by isValid().

GenericUri::isValidQuery | ( |  | ) |

Definition at line 538 of file GenericUri.class.php.

References isValidFragmentOrQuery().

Referenced by isValid().

Here is the call graph for this function:

GenericUri::isValidScheme | ( |  | ) |

Reimplemented in HttpUrl.

Definition at line 410 of file GenericUri.class.php.

Referenced by isValid().

GenericUri::isValidUserInfo | ( |  | ) |

Definition at line 419 of file GenericUri.class.php.

References userInfoCharPattern().

Referenced by isValid().

Here is the call graph for this function:

GenericUri::mergePath | ( | $ | path | ) | `[private]`

Definition at line 669 of file GenericUri.class.php.

References $path, getAuthority(), and getPath().

Here is the call graph for this function:

GenericUri::normalize | ( |  | ) |

See also:
  http://tools.ietf.org/html/rfc3986#section-6

Reimplemented in HttpUrl, and Url.

Definition at line 684 of file GenericUri.class.php.

References fragmentOrQueryCharPattern(), getFragment(), getHost(), getPath(), getQuery(), getScheme(), getUserInfo(), hostNameCharPattern(), normalizePercentEncoded(), segmentCharPattern(), setFragment(), setHost(), setPath(), setQuery(), setScheme(), setUserInfo(), and userInfoCharPattern().

Here is the call graph for this function:

GenericUri::normalizePercentEncoded | ( | $ | string,
|  | $ | unreservedPartChars |
| ) |  |  | `[private]`

Definition at line 730 of file GenericUri.class.php.

References PercentEncodingNormalizator::create().

Referenced by normalize().

Here is the call graph for this function:

GenericUri::parse | ( | $ | uri,
|  | $ | guessClass = `false` |
| ) |  |  | `[final]`

Returns:
  GenericUri

Definition at line 44 of file GenericUri.class.php.

References getKnownSubSchemes().

Here is the call graph for this function:

static GenericUri::removeDotSegments | ( | $ | path | ) | `[static, private]`

Definition at line 615 of file GenericUri.class.php.

References $path.

GenericUri::segmentCharPattern | ( | $ | pctEncoded = `true` | ) | `[protected]`

Definition at line 598 of file GenericUri.class.php.

References charPattern().

Referenced by isValidPath(), and normalize().

Here is the call graph for this function:

GenericUri::setAuthority | ( | $ | authority | ) |

Returns:
  GenericUri

Definition at line 307 of file GenericUri.class.php.

References setHost(), setPort(), and setUserInfo().

Referenced by HttpUrl::ensureAbsolute(), and Url::fixAuthorityFromPath().

Here is the call graph for this function:

GenericUri::setFragment | ( | $ | fragment | ) |

Returns:
  GenericUri

Definition at line 292 of file GenericUri.class.php.

References $fragment.

Referenced by normalize().

GenericUri::setHost | ( | $ | host | ) |

Returns:
  GenericUri

Definition at line 215 of file GenericUri.class.php.

References $host.

Referenced by normalize(), setAuthority(), HttpUrl::setHttpHost(), and transform().

GenericUri::setPath | ( | $ | path | ) |

Returns:
  GenericUri

Definition at line 245 of file GenericUri.class.php.

References $path.

Referenced by HttpUrl::ensureAbsolute(), Url::fixAuthorityFromPath(), Url::fixMistakenPath(), HttpUrl::normalize(), normalize(), and transform().

GenericUri::setPort | ( | $ | port | ) |

Returns:
  GenericUri

Definition at line 230 of file GenericUri.class.php.

References $port.

Referenced by Url::normalize(), HttpUrl::normalize(), setAuthority(), HttpUrl::setHttpHost(), and transform().

GenericUri::setQuery | ( | $ | query | ) |

Returns:
  GenericUri

Definition at line 260 of file GenericUri.class.php.

References $query.

Referenced by appendQuery(), normalize(), and transform().

GenericUri::setScheme | ( | $ | scheme | ) |

Returns:
  GenericUri

Definition at line 185 of file GenericUri.class.php.

References $scheme.

Referenced by Url::fixMistakenPath(), normalize(), and transform().

GenericUri::setSchemeSpecificPart | ( | $ | schemeSpecificPart | ) |

Definition at line 348 of file GenericUri.class.php.

GenericUri::setUserInfo | ( | $ | userInfo | ) |

Returns:
  GenericUri

Definition at line 200 of file GenericUri.class.php.

References $userInfo.

Referenced by normalize(), setAuthority(), and transform().

GenericUri::toString | ( |  | ) |

Implements Stringable.

Definition at line 373 of file GenericUri.class.php.

References getSchemeSpecificPart().

Referenced by OpenIdConsumer::makeCheckIdRequest().

Here is the call graph for this function:

GenericUri::toStringFromRoot | ( |  | ) |

Definition at line 385 of file GenericUri.class.php.

GenericUri::transform | ( | GenericUri $ | reference,
|  | $ | strict = `true` |
| ) |  |  | `[final]`

See also:
  http://tools.ietf.org/html/rfc3986#section-5.2.2

Returns:
  GenericUri

Definition at line 106 of file GenericUri.class.php.

References $path, getAuthority(), getFragment(), getHost(), getPath(), getPort(), getQuery(), getScheme(), getUserInfo(), setHost(), setPath(), setPort(), setQuery(), setScheme(), and setUserInfo().

Here is the call graph for this function:

GenericUri::userInfoCharPattern | ( | $ | pctEncoded = `true` | ) | `[protected]`

Definition at line 588 of file GenericUri.class.php.

References charPattern().

Referenced by isValidUserInfo(), and normalize().

Here is the call graph for this function:

## Member Data Documentation

GenericUri::$fragment = null`[protected]`

Definition at line 31 of file GenericUri.class.php.

Referenced by setFragment().

GenericUri::$host = null`[protected]`

Definition at line 26 of file GenericUri.class.php.

Referenced by setHost(), and HttpUrl::setHttpHost().

GenericUri::$path = null`[protected]`

Definition at line 29 of file GenericUri.class.php.

Referenced by mergePath(), removeDotSegments(), setPath(), and transform().

GenericUri::$port = null`[protected]`

Definition at line 27 of file GenericUri.class.php.

Referenced by HttpUrl::normalize(), and setPort().

GenericUri::$query = null`[protected]`

Definition at line 30 of file GenericUri.class.php.

Referenced by appendQuery(), and setQuery().

GenericUri::$scheme = null`[protected]`

Definition at line 23 of file GenericUri.class.php.

Referenced by HttpUrl::normalize(), and setScheme().

GenericUri::$userInfo = null`[protected]`

Definition at line 25 of file GenericUri.class.php.

Referenced by setUserInfo().

const GenericUri::CHARS_SUBDELIMS = '!$&\'()*+,;='

Definition at line 20 of file GenericUri.class.php.

const GenericUri::CHARS_UNRESERVED = 'a-z0-9-._~'

Definition at line 19 of file GenericUri.class.php.

Referenced by PercentEncodingNormalizator::normalize().

const GenericUri::PATTERN_PCTENCODED = '%[0-9a-f][0-9a-f]'

Definition at line 21 of file GenericUri.class.php.

The documentation for this class was generated from the following file:

- main/Net/GenericUri.class.php