[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/ -> TUrlManager.php (sommaire)

TUrlManager class file

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2006 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id $
Poids: 142 lignes (4 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

TUrlManager:: (2 méthodes):
  constructUrl()
  parseUrl()


Classe: TUrlManager  - X-Ref

TUrlManager class

TUrlManager is the base class for managing URLs that can be
recognized by PRADO applications. It provides the default implementation
for parsing and constructing URLs.

Derived classes may override {@link constructUrl} and {@link parseUrl}
to provide customized URL schemes.

By default, {@link THttpRequest} uses TUrlManager as its URL manager.
If you want to use your customized URL manager, load your manager class
as an application module and set {@link THttpRequest::setUrlManager THttpRequest.UrlManager}
with the ID of your URL manager module.

constructUrl($serviceID,$serviceParam,$getItems,$encodeAmpersand,$encodeGetItems)   X-Ref
Constructs a URL that can be recognized by PRADO.

This method provides the actual implementation used by {@link THttpRequest::constructUrl}.
Override this method if you want to provide your own way of URL formatting.
If you do so, you may also need to override {@link parseUrl} so that the URL can be properly parsed.

The URL is constructed as the following format:
/entryscript.php?serviceID=serviceParameter&get1=value1&...
If {@link THttpRequest::setUrlFormat THttpRequest.UrlFormat} is 'Path',
the following format is used instead:
/entryscript.php/serviceID/serviceParameter/get1,value1/get2,value2...
param: string service ID
param: string service parameter
param: array GET parameters, null if not provided
param: boolean whether to encode the ampersand in URL
param: boolean whether to encode the GET parameters (their names and values)
return: string URL

parseUrl()   X-Ref
Parses the request URL and returns an array of input parameters.
This mehtod is automatically invoked by {@link THttpRequest} when
handling a user request.

In general, this method should parse the path info part of the requesting URL
and generate an array of name-value pairs according to some scheme.
The current implementation deals with both 'Get' and 'Path' URL formats.

You may override this method to support customized URL format.
return: array list of input parameters, indexed by parameter names



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7