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

Class: Net_URL2

Source Location: /Net_URL2-0.1.0/URL2.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 39]


[ Top ]


Class Variables

$anchor =

[line 105]

Anchor
  • Access: public

Type:   string


[ Top ]

$host =

[line 81]

Host
  • Access: public

Type:   string


[ Top ]

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

[line 49]

Options

This is the options available for the neturl options.

  • Var: The options of Net_URL2
  • Access: public

Type:   array


[ Top ]

$pass =

[line 75]

Password
  • Access: public

Type:   string


[ Top ]

$path =

[line 93]

Path
  • Access: public

Type:   string


[ Top ]

$port =

[line 87]

Port
  • Access: public

Type:   integer


[ Top ]

$protocol =

[line 63]

Protocol
  • Access: public

Type:   string


[ Top ]

$querystring =

[line 99]

Query string
  • Access: public

Type:   array


[ Top ]

$url =

[line 57]

Full url
  • Access: public

Type:   string


[ Top ]

$useBrackets =

[line 111]

Whether to use [] in querystrings
  • Access: public

Type:   boolean


[ Top ]

$user =

[line 69]

Username
  • Access: public

Type:   string


[ Top ]



Method Detail

__construct (Constructor)   [line 124]

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

Constructor

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

  • Access: public

Parameters:

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

[ Top ]

addQueryString   [line 231]

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 rawurlencoded or not, default = not

[ Top ]

addRawQueryString   [line 266]

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

mixed getOption( $optionName)

Get an option

This function will get an option from the options private variable.

  • Return: Bool false if the key doesn't exist and the value of the option if it exists.
  • See: $this->options
  • Access: public

Parameters:

   $optionName   — 

[ Top ]

getQueryString   [line 276]

string getQueryString( )

Returns flat querystring
  • Return: Querystring
  • Access: public

[ Top ]

getStandardPort   [line 362]

integer getStandardPort( string $scheme)

Returns the standard port number for a protocol

Parameters:

string   $scheme   —  The protocol to lookup

[ Top ]

getURL   [line 209]

string getURL( )

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

[ Top ]

removeQueryString   [line 250]

void removeQueryString( string $name)

Removes a querystring item
  • Access: public

Parameters:

string   $name   —  Name of item

[ Top ]

resolvePath   [line 325]

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

  • Return: The result
  • Access: public

Parameters:

string   $url   —  URL path to resolve
   $path   — 

[ Top ]

setOption   [line 437]

void setOption( string $optionName, string $value)

Set a private option

This function sets a private option

  • Access: public

Parameters:

string   $optionName   —  The option name
string   $value   —  The value of this option

[ Top ]

setProtocol   [line 308]

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

Forces the URL to a particular protocol
  • Access: public

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 15:01:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.