EC-CUBE
Public メソッド | 変数
クラス Net_URL

Public メソッド

 Net_URL ($url=null, $useBrackets=true)
 __construct ($url=null, $useBrackets=true)
 initialize ()
 getURL ()
 addQueryString ($name, $value, $preencoded=false)
 removeQueryString ($name)
 addRawQueryString ($querystring)
 getQueryString ()
 _parseRawQuerystring ($querystring)
 resolvePath ($path)
 getStandardPort ($scheme)
 setProtocol ($protocol, $port=null)
 setOption ($optionName, $value)
 getOption ($optionName)

変数

 $options = array('encode_query_keys' => false)
 $url
 $protocol
 $username
 $password
 $host
 $port
 $path
 $querystring
 $anchor
 $useBrackets

コンストラクタとデストラクタ

__construct ( url = null,
useBrackets = true 
)

PHP5 Constructor

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

引数:
string$urlOptional URL
bool$useBracketsWhether to use square brackets when multiple querystrings with the same name exist

関数

_parseRawQuerystring ( querystring)

Parses raw querystring and returns an array of it

引数:
string$querystringThe querystring to parse
戻り値:
array An array of the querystring data private
addQueryString ( name,
value,
preencoded = false 
)

Adds or updates a querystring item (URL parameter). Automatically encodes parameters with rawurlencode() if $preencoded is false. You can pass an array to $value, it gets mapped via [] in the URL if $this->useBrackets is activated.

引数:
string$nameName of item
string$valueValue of item
bool$preencodedWhether value is urlencoded or not, default = not public
addRawQueryString ( querystring)

Sets the querystring to literally what you supply

引数:
string$querystringThe querystring data. Should be of the format foo=bar&x=y etc public
getOption ( optionName)

Get an option

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

public

引数:
string$opionNameThe name of the option to retrieve
参照:
$this->options

Returns flat querystring

戻り値:
string Querystring public
getStandardPort ( scheme)

Returns the standard port number for a protocol

引数:
string$schemeThe protocol to lookup
戻り値:
integer Port number or NULL if no scheme matches
作者:
Philippe Jausions <Philippe.Jausions@11abacus.com>
getURL ( )

Returns full url

戻り値:
string Full url public

Figure out host/port

Net_URL ( url = null,
useBrackets = true 
)

PHP4 Constructor

参照:
__construct()
removeQueryString ( name)

Removes a querystring item

引数:
string$nameName of item public
resolvePath ( path)

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.

引数:
string$pathURL path to resolve
戻り値:
string The result
setOption ( optionName,
value 
)

Set an option

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

public

引数:
string$optionNameThe optionname to set
string$valueThe value of this option.
setProtocol ( protocol,
port = null 
)

Forces the URL to a particular protocol

引数:
string$protocolProtocol to force the URL to
integer$portOptional port (standard port is used by default)

このクラスの説明は次のファイルから生成されました:
 全て データ構造 ネームスペース 関数 変数