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

Class: Net_URL

Source Location: /Net_URL-1.0.13/URL.php

Class Overview




Variables

Methods


Inherited Variables

Inherited 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 ]



Method Detail

__construct (Constructor)   [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 ]

Net_URL (Constructor)   [line 106]

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

PHP4 Constructor
  • See: __construct()

Parameters:

   $url   — 
   $useBrackets   — 

[ Top ]

addQueryString   [line 233]

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 261]

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 ]

getQueryString   [line 272]

string getQueryString( )

Returns flat querystring
  • Return: Querystring
  • Access: public

[ Top ]

getStandardPort   [line 383]

integer getStandardPort( string $scheme)

Returns the standard port number for a protocol

Parameters:

string   $scheme   —  The protocol to lookup

[ Top ]

getURL   [line 210]

string getURL( )

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

[ Top ]

removeQueryString   [line 248]

void removeQueryString( string $name)

Removes a querystring item
  • Access: public

Parameters:

string   $name   —  Name of item

[ Top ]

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.

  • Return: The result

Parameters:

string   $url   —  URL path to resolve
   $path   — 

[ Top ]

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 Mon, 11 Mar 2019 10:17:15 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.