- Home
- About
- Testimonials
- Demos
- Download
- Documentation
- Blogs
- Forum
- Support

Packages:
default
System
System.Caching
System.Collections
System.Data
System.Data.ActiveRecord
System.Data.ActiveRecord.Relations
System.Data.ActiveRecord.Scaffold
System.Data.ActiveReecord.Scaffold.InputBuilder
System.Data.Commom.Sqlite
System.Data.Common
System.Data.Common.Mssql
System.Data.Common.Mysql
System.Data.Common.Oracle
System.Data.Common.Pgsql
System.Data.Common.Sqlite
System.Data.DataGateway
System.Data.SqlMap
System.Data.SqlMap.Configuration
System.Data.SqlMap.Statements
System.Exceptions
System.I18N
System.IO
System.Security
System.Util
System.Web
System.Web.Services
System.Web.UI
System.Web.UI.ActiveControls
System.Web.UI.WebControls
System.Web.UI.WebControls.assets
System.Xml
Classes:
TAssetManager
TCacheHttpSession
THttpCookie
THttpCookieCollection
THttpRequest
THttpRequestUrlFormat
THttpResponse
THttpResponseAdapter
THttpSession
THttpSessionCookieMode
THttpUtility
TSessionIterator
TUri
TUrlManager
TUrlMapping
TUrlMappingPattern

Keyword

# Class TUrlManager

    TComponent
       |
       --TApplicationComponent
          |
          --TModule
             |
             --TUrlManager

#### Direct Known Sub-classes:

TUrlMapping

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 constructUrl and parseUrl to provide customized URL schemes.

By default, 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 THttpRequest::setUrlManager with the ID of your URL manager module.

Since: 3.0.6
Author: Qiang Xue <qiang.xue@gmail.com>

Method Summary
string | constructUrl ( string $serviceID, string $serviceParam, array $getItems, boolean $encodeAmpersand, boolean $encodeGetItems) Constructs a URL that can be recognized by PRADO.
array | parseUrl () Parses the request URL and returns an array of input parameters.

Methods Inherited From TModule
TModule::getID(), TModule::init(), TModule::setID()

Methods Inherited From TApplicationComponent
TApplicationComponent::getApplication(), TApplicationComponent::getRequest(), TApplicationComponent::getResponse(), TApplicationComponent::getService(), TApplicationComponent::getSession(), TApplicationComponent::getUser(), TApplicationComponent::publishAsset(), TApplicationComponent::publishFilePath()

Methods Inherited From TComponent

TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()

Method Details

## constructUrl

public string constructUrl | (string $serviceID , string $serviceParam , array $getItems , boolean $encodeAmpersand , boolean $encodeGetItems )

Constructs a URL that can be recognized by PRADO.

This method provides the actual implementation used by 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 parseUrl so that the URL can be properly parsed.

The URL is constructed as the following format: /entryscript.php?serviceID=serviceParameter&get1=value1&... If THttpRequest::setUrlFormat is 'Path', the following format is used instead: /entryscript.php/serviceID/serviceParameter/get1,value1/get2,value2...

Input
string | $serviceID | service ID
string | $serviceParam | service parameter
array | $getItems | GET parameters, null if not provided
boolean | $encodeAmpersand | whether to encode the ampersand in URL
boolean | $encodeGetItems | whether to encode the GET parameters (their names and values)
Output
string | URL
Exception

## parseUrl

public array parseUrl | ()

Parses the request URL and returns an array of input parameters.

This method is automatically invoked by 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.

Output
array | list of input parameters, indexed by parameter names
Exception