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

Class: Net_URL

Source Location: /pear/Net/URL.php

Class Overview




Variables

Methods



Class Details

[line 39]


[ Top ]


Class Variables

$anchor =

[line 93]

Anchor


Type:   string


[ Top ]

$host =

[line 69]

Host


Type:   string


[ Top ]

$password =

[line 63]

Password


Type:   string


[ Top ]

$path =

[line 81]

Path


Type:   string


[ Top ]

$port =

[line 75]

Port


Type:   integer


[ Top ]

$protocol =

[line 51]

Protocol


Type:   string


[ Top ]

$querystring =

[line 87]

Query string


Type:   array


[ Top ]

$url =

[line 45]

Full url


Type:   string


[ Top ]

$useBrackets =

[line 99]

Whether to use []


Type:   bool


[ Top ]

$username =

[line 57]

Username


Type:   string


[ Top ]



Class Methods


constructor __construct [line 122]

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 ]

constructor Net_URL [line 106]

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

PHP4 Constructor



Tags:



Parameters:

   $url  
   $useBrackets  

[ Top ]

method addQueryString [line 233]

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

Adds a querystring item



Tags:

access:  public


Parameters:

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

[ Top ]

method addRawQueryString [line 261]

void addRawQueryString( string $querystring)

Sets the querystring to literally what you supply



Tags:

access:  public


Parameters:

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

[ Top ]

method getQueryString [line 272]

string getQueryString( )

Returns flat querystring



Tags:

return:  Querystring
access:  public


[ Top ]

method getStandardPort [line 383]

integer getStandardPort( string $scheme)

Returns the standard port number for a protocol



Tags:

return:  Port number or NULL if no scheme matches
author:  Philippe Jausions <Philippe.Jausions@11abacus.com>


Parameters:

string   $scheme   The protocol to lookup

[ Top ]

method getURL [line 210]

string getURL( )

Returns full url



Tags:

return:  Full url
access:  public


[ Top ]

method removeQueryString [line 248]

void removeQueryString( string $name)

Removes a querystring item



Tags:

access:  public


Parameters:

string   $name   Name of item

[ Top ]

method resolvePath [line 346]

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.




Tags:

return:  The result


Parameters:

string   $url   URL path to resolve
   $path  

[ Top ]

method setProtocol [line 403]

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 Sun, 08 Jan 2012 17:52:06 +0100 by phpDocumentor 1.4.3