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

Class: Net_URL

Source Location: /Net_URL-1.0.15/URL.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 40]


[ Top ]


Class Variables

$anchor =

[line 95]

Anchor

Type:   string


[ Top ]

$host =

[line 71]

Host

Type:   string


[ Top ]

$options = array('encode_query_keys' => false)

[line 42]


Type:   mixed


[ Top ]

$password =

[line 65]

Password

Type:   string


[ Top ]

$path =

[line 83]

Path

Type:   string


[ Top ]

$port =

[line 77]

Port

Type:   integer


[ Top ]

$protocol =

[line 53]

Protocol

Type:   string


[ Top ]

$querystring =

[line 89]

Query string

Type:   array


[ Top ]

$url =

[line 47]

Full url

Type:   string


[ Top ]

$url =

[line 103]


Type:   mixed


[ Top ]

$useBrackets =

[line 104]


Type:   mixed


[ Top ]

$useBrackets =

[line 101]

Whether to use []

Type:   bool


[ Top ]

$username =

[line 59]

Username

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 126]

Net_URL __construct( [string $url = null], [bool $useBrackets = true])

PHP5 Constructor

Parses the given url and stores the various parts Defaults are used in certain cases


Parameters:

string   $url     Optional URL
bool   $useBrackets     Whether to use square brackets when multiple querystrings with the same name exist

[ Top ]

Net_URL (Constructor)   [line 110]

Net_URL Net_URL( [ $url = null], [ $useBrackets = true])

PHP4 Constructor
  • See: __construct()

Parameters:

   $url     
   $useBrackets     

[ Top ]

addQueryString   [line 243]

void addQueryString( string $name, string $value, [bool $preencoded = false])

Adds a querystring item
  • Access: public

Parameters:

string   $name     Name of item
string   $value     Value of item
bool   $preencoded     Whether value is urlencoded or not, default = not

[ Top ]

addRawQueryString   [line 279]

void addRawQueryString( string $querystring)

Sets the querystring to literally what you supply
  • Access: public

Parameters:

string   $querystring     The querystring data. Should be of the format foo=bar&x=y etc

[ Top ]

getOption   [line 473]

void getOption( $optionName, string $opionName)

Get an option

This function gets an option from the $this->options array and return it's value.

  • See: $this->options
  • Access: public

Parameters:

string   $opionName     The name of the option to retrieve
   $optionName     

[ Top ]

getQueryString   [line 290]

string getQueryString( )

Returns flat querystring
  • Return: Querystring
  • Access: public

[ Top ]

getStandardPort   [line 416]

integer getStandardPort( string $scheme)

Returns the standard port number for a protocol

Parameters:

string   $scheme     The protocol to lookup

[ Top ]

getURL   [line 220]

string getURL( )

Returns full url
  • Return: Full url
  • Access: public

[ Top ]

initialize   [line 134]

void initialize( [ $url = null], [ $useBrackets = true])


Parameters:

   $url     
   $useBrackets     

[ Top ]

removeQueryString   [line 262]

void removeQueryString( string $name)

Removes a querystring item
  • Access: public

Parameters:

string   $name     Name of item

[ Top ]

resolvePath   [line 379]

string resolvePath( $path, string $url)

Resolves //, ../ and ./ from a path and returns the result. Eg:

/foo/bar/../boo.php => /foo/boo.php /foo/bar/../../boo.php => /boo.php /foo/bar/.././/boo.php => /foo/boo.php

This method can also be called statically.

  • Return: The result

Parameters:

string   $url     URL path to resolve
   $path     

[ Top ]

setOption   [line 452]

void setOption( string $optionName, string $value)

Set an option

This function set an option to be used thorough the script.

  • Access: public

Parameters:

string   $optionName     The optionname to set
string   $value     The value of this option.

[ Top ]

setProtocol   [line 436]

void setProtocol( string $protocol, [integer $port = null])

Forces the URL to a particular protocol

Parameters:

string   $protocol     Protocol to force the URL to
integer   $port     Optional port (standard port is used by default)

[ Top ]


Documentation generated on Mon, 07 May 2007 21:30:04 -0400 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.