Packages

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • NFtp
  • NHtml
  • NHttpContext
  • NHttpRequest
  • NHttpResponse
  • NHttpUploadedFile
  • NSession
  • NSessionNamespace
  • NUri
  • NUriScript
  • NUser

Interfaces

  • IHttpRequest
  • IHttpResponse
  • IUser

Exceptions

  • NFtpException
  • Overview
  • Package
  • Class
  • Tree
  • Other releases

Class NUri

URI Syntax (RFC 3986).

http://user:password@nette.org:8042/en/manual.html?name=param#fragment
\__/^^^\__________________________/\_____________/^\________/^\______/
  |                 |                     |            |         |
scheme          authority               path         query    fragment
  • authority: [user[:password]@]host[:port]
  • hostUri: http://user:password@nette.org:8042
NObject
Extended by NFreezableObject
Extended by NUri

Direct known subclasses

NUriScript
Package: Nette\Web
Author: David Grudl
Located at Web/Uri.php
Methods summary
public
# __construct( string $uri = NULL )

Parameters

$uri
string
URL

Throws

NInvalidArgumentException
public NUri
# setScheme( string $value )

Sets the scheme part of URI.

Sets the scheme part of URI.

Parameters

$value
string

Returns

NUri
provides a fluent interface
public string
# getScheme( )

Returns the scheme part of URI.

Returns the scheme part of URI.

Returns

string
public NUri
# setUser( string $value )

Sets the user name part of URI.

Sets the user name part of URI.

Parameters

$value
string

Returns

NUri
provides a fluent interface
public string
# getUser( )

Returns the user name part of URI.

Returns the user name part of URI.

Returns

string
public NUri
# setPassword( string $value )

Sets the password part of URI.

Sets the password part of URI.

Parameters

$value
string

Returns

NUri
provides a fluent interface
public string
# getPassword( )

Returns the password part of URI.

Returns the password part of URI.

Returns

string
public NUri
# setHost( string $value )

Sets the host part of URI.

Sets the host part of URI.

Parameters

$value
string

Returns

NUri
provides a fluent interface
public string
# getHost( )

Returns the host part of URI.

Returns the host part of URI.

Returns

string
public NUri
# setPort( string $value )

Sets the port part of URI.

Sets the port part of URI.

Parameters

$value
string

Returns

NUri
provides a fluent interface
public string
# getPort( )

Returns the port part of URI.

Returns the port part of URI.

Returns

string
public NUri
# setPath( string $value )

Sets the path part of URI.

Sets the path part of URI.

Parameters

$value
string

Returns

NUri
provides a fluent interface
public string
# getPath( )

Returns the path part of URI.

Returns the path part of URI.

Returns

string
public NUri
# setQuery( string|array $value )

Sets the query part of URI.

Sets the query part of URI.

Parameters

$value
string|array

Returns

NUri
provides a fluent interface
public
# appendQuery( string|array $value )

Appends the query part of URI.

Appends the query part of URI.

Parameters

$value
string|array
public string
# getQuery( )

Returns the query part of URI.

Returns the query part of URI.

Returns

string
public NUri
# setFragment( string $value )

Sets the fragment part of URI.

Sets the fragment part of URI.

Parameters

$value
string

Returns

NUri
provides a fluent interface
public string
# getFragment( )

Returns the fragment part of URI.

Returns the fragment part of URI.

Returns

string
public string
# getAbsoluteUri( )

Returns the entire URI including query string and fragment.

Returns the entire URI including query string and fragment.

Returns

string
public string
# getAuthority( )

Returns the [user[:pass]@]host[:port] part of URI.

Returns the [user[:pass]@]host[:port] part of URI.

Returns

string
public string
# getHostUri( )

Returns the scheme and authority part of URI.

Returns the scheme and authority part of URI.

Returns

string
public boolean
# isEqual( string $uri )

URI comparsion (this object must be in canonical form).

URI comparsion (this object must be in canonical form).

Parameters

$uri
string

Returns

boolean
public
# canonicalize( )

Transform to canonical form.

Transform to canonical form.

public string
# __toString( )

Returns

string
public static string
# unescape( string $s, string $reserved = '%;/?:@&=+$,' )

Similar to rawurldecode, but preserve reserved chars encoded.

Similar to rawurldecode, but preserve reserved chars encoded.

Parameters

$s
string
to decode
$reserved
string
reserved characters

Returns

string
Methods inherited from NFreezableObject
__clone(), freeze(), isFrozen(), updating()
Methods inherited from NObject
__call(), __callStatic(), __get(), __isset(), __set(), __unset(), extensionMethod(), getReflection()
Properties summary
public static array $defaultPorts array( 'http' => 80, 'https' => 443, 'ftp' => 21, 'news' => 119, 'nntp' => 119, )
#
Nette Framework 0.9.7 (for PHP 5.2) API documentation generated by ApiGen 2.3.0