ZenMagick 0.9.8


org.zenmagick.mvc.utils.ZMToolboxNet
\mvc\toolbox\tools\ZMToolboxNet.php at line 31

Class ZMToolboxNet

ZMObject
└─ZMToolboxTool
└─ZMToolboxNet

public class ZMToolboxNet
extends ZMToolboxTool

Networking/URL related functions.

Author:
DerManoMann
Version:
$Id: ZMToolboxNet.php 2626 2009-11-24 01:51:07Z dermanomann $

Fields inherited from org.zenmagick.toolbox.ZMToolboxTool
request_, toolbox_
Fields inherited from org.zenmagick.core.ZMObject
properties_
Method Summary
string

absolute(string url)

Convert a given relative url into an absolute one.

string

decode(string url)

Decode a HTML encoded URL.

string

encode(string url)

Encode a given URL to valid HTML.

string

url(string requestId, string params, boolean secure, boolean echo)

Create a URL.

Methods inherited from org.zenmagick.toolbox.ZMToolboxTool
getRequest, getToolbox, setRequest, setToolbox
Methods inherited from org.zenmagick.core.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Method Detail

\mvc\toolbox\tools\ZMToolboxNet.php at line 96

absolute

public string absolute(string url)

Convert a given relative url into an absolute one.

Parameters:
url - The (relative) URL to convert.
Returns:
The absolute url.

\mvc\toolbox\tools\ZMToolboxNet.php at line 118

decode

public string decode(string url)

Decode a HTML encoded URL.

Parameters:
url - The url to decode.
Returns:
The decoded URL.

\mvc\toolbox\tools\ZMToolboxNet.php at line 106

encode

public string encode(string url)

Encode a given URL to valid HTML.

Parameters:
url - The url to encode.
Returns:
The URL encoded in valid HTM.

\mvc\toolbox\tools\ZMToolboxNet.php at line 51

url

public string url(string requestId, string params, boolean secure, boolean echo)

Create a URL.

Mother of all URL related methods.

If the requestId parameter is null, the current requestId will be used. The provided parameter will be merged into the current query string.

If the params parameter is null, all parameters of the current request will be added.

Parameters:
requestId - The request id.
params - Query string style parameter; if null add all current parameter
secure - Flag indicating whether to create a secure or non secure URL; default is false.
echo - If true, the URL will be echo'ed as well as returned.
Returns:
A full URL.
Todo:
create store agnostic default implementations

ZenMagick 0.9.8