apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Net_URL2

Source Location: /Net_URL2-0.2.0/URL2.php

Class Overview




Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 43]
  • License: BSD


[ Top ]


Method Detail

getAuthority   [line 283]

string|bool getAuthority( )

Returns the authority part, i.e. [ userinfo "@" ] host [ ":" port ], or false if there is no authority none.
  • Access: public

[ Top ]

getCanonical   [line 731]

string getCanonical( )

Returns a Net_URL2 instance representing the canonical URL of the currently executing PHP script.
  • Access: public

[ Top ]

getFragment   [line 375]

string|bool getFragment( )

Returns the fragment name, or false if "#" isn't present in the URL.
  • Access: public

[ Top ]

getHost   [line 241]

string|bool getHost( )

Returns the host part, or false if there is no authority part, e.g.

relative URLs.

  • Access: public

[ Top ]

getNormalizedURL   [line 541]

string getNormalizedURL( )

Returns a normalized string representation of this URL. This is useful for comparison of URLs.
  • Access: public

[ Top ]

getOption   [line 808]

mixed getOption( string $optionName)

Returns the value of the specified option.

Parameters:

string   $optionName   —  The name of the option to retrieve

[ Top ]

getPassword   [line 202]

string|bool getPassword( )

Returns the password part of the userinfo part (the part after the first ":"), or false if there is no userinfo part (i.e. the URL does not contain "@" in front of the hostname) or the userinfo part does not contain ":".
  • Access: public

[ Top ]

getPath   [line 332]

string getPath( )

Returns the path part (possibly an empty string).
  • Access: public

[ Top ]

getPort   [line 262]

int|bool getPort( )

Returns the port number, or false if there is no port number specified, i.e. if the default port is to be used.
  • Access: public

[ Top ]

getQuery   [line 354]

string|bool getQuery( )

Returns the query string (excluding the leading "?"), or false if "?" isn't present in the URL.
  • See: self::getQueryVariables()
  • Access: public

[ Top ]

getQueryVariables   [line 396]

array getQueryVariables( )

Returns the query string like an array as the variables would appear in $_GET in a PHP script.
  • Access: public

[ Top ]

getRequested   [line 767]

Net_URL2 getRequested( )

Returns a Net_URL2 instance representing the URL used to retrieve the current request.
  • Access: public

[ Top ]

getRequestedURL   [line 756]

string getRequestedURL( )

Returns the URL used to retrieve the current request.
  • Access: public

[ Top ]

getScheme   [line 167]

string|bool getScheme( )

Returns the scheme, e.g. "http" or "urn", or false if there is no scheme specified, i.e. if this is a relative URL.
  • Access: public

[ Top ]

getURL   [line 509]

string getURL( )

Returns a string representation of this URL.
  • Access: public

[ Top ]

getUser   [line 189]

string|bool getUser( )

Returns the user part of the userinfo part (the part preceding the first ":"), or false if there is no userinfo part.
  • Access: public

[ Top ]

getUserinfo   [line 213]

string|bool getUserinfo( )

Returns the userinfo part, or false if there is none, i.e. if the authority part does not contain "@".
  • Access: public

[ Top ]

isAbsolute   [line 596]

bool isAbsolute( )

Returns whether this instance represents an absolute URL.
  • Access: public

[ Top ]

normalize   [line 553]

Net_URL2 normalize( )

Returns a normalized Net_URL2 instance.
  • Access: public

[ Top ]

__construct (Constructor)   [line 125]

Net_URL2 __construct( string $url, [array $options = null])

  • Access: public

Parameters:

string   $url   —  an absolute or relative URL
array   $options   — 

[ Top ]

resolve   [line 609]

Net_URL2 resolve( Net_URL2|string $reference)

Returns an Net_URL2 instance representing an absolute URL relative to this URL.
  • Access: public

Parameters:

Net_URL2|string   $reference   —  relative URL

[ Top ]

setAuthority   [line 309]

void setAuthority( string|false $authority)

  • Access: public

Parameters:

string|false   $authority   — 

[ Top ]

setFragment   [line 385]

void setFragment( string|bool $fragment)

  • Access: public

Parameters:

string|bool   $fragment   — 

[ Top ]

setHost   [line 251]

void setHost( string|bool $host)

  • Access: public

Parameters:

string|bool   $host   — 

[ Top ]

setOption   [line 793]

void setOption( string $optionName, mixed $value)

Sets the specified option.
  • See: self::OPTION_ENCODE_KEYS
  • See: self::OPTION_USE_BRACKETS
  • See: self::OPTION_STRICT

Parameters:

string   $optionName   —  a self::OPTION_ constant
mixed   $value   —  option value

[ Top ]

setPath   [line 342]

void setPath( string $path)

  • Access: public

Parameters:

string   $path   — 

[ Top ]

setPort   [line 272]

void setPort( int|bool $port)

  • Access: public

Parameters:

int|bool   $port   — 

[ Top ]

setQuery   [line 365]

void setQuery( string|bool $query)

  • See: self::setQueryVariables()
  • Access: public

Parameters:

string|bool   $query   — 

[ Top ]

setQueryVariable   [line 485]

array setQueryVariable( string $name, mixed $value)

  • Access: public

Parameters:

string   $name   — 
mixed   $value   — 

[ Top ]

setQueryVariables   [line 452]

void setQueryVariables( array $array)

  • Access: public

Parameters:

array   $array   —  (name => value) array

[ Top ]

setScheme   [line 178]

void setScheme( string|bool $scheme)

  • See: getScheme()
  • Access: public

Parameters:

string|bool   $scheme   — 

[ Top ]

setUserinfo   [line 227]

void setUserinfo( string|bool $userinfo, [string|bool $password = false])

Sets the userinfo part. If two arguments are passed, they are combined in the userinfo part as username ":" password.
  • Access: public

Parameters:

string|bool   $userinfo   —  userinfo or username
string|bool   $password   — 

[ Top ]

unsetQueryVariable   [line 497]

void unsetQueryVariable( string $name)

  • Access: public

Parameters:

string   $name   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:23:07 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.