|
Tv2 documentation | |||||
PREV NEXT | FRAMES NO FRAME | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class analyzes URL and calls the appropriate module.
Field Summary | |
private array | $map Array containing "addresses" of modules |
private string | $url Relative url from SITE_BURL |
Constructor Summary | |
object | ctlUrlMapper() Constructor. |
Method Summary | |
string | buildUrl(string $url, [string $par]) Creates and returns full URL made of partial URL $url and optional additional GET parameters. |
string | doMapping(string $url) Maps partial URL to the appropriate module. |
string | getUrl([boolean $full]) Returns partial or full URL. |
boolean | loadMap(mixed $mymap) Fills $this->map with values from an array or file |
private string | runModule(array $addr, [array $nurls]) This method loads a module and returns result from the module's method. |
Field Detail |
private array $map
Array containing "addresses" of modules
private string $url
Relative url from SITE_BURL
Constructor Detail |
object ctlUrlMapper()
Constructor. Gets URL into $url attribute, creates other attributes.
Method Detail |
string buildUrl(string $url, [string $par])
Creates and returns full URL made of partial URL $url and optional additional GET parameters.
url
- partial URLpar
- Parameter part of the URL (e.g. var1=val1&var2=val2)string doMapping(string $url)
Maps partial URL to the appropriate module. Calls $site->showIndex() or $this->runModule, or $site->showError(404)
url
- URL from requeststring getUrl([boolean $full])
Returns partial or full URL. Partial URLs are relative to SITE_URL.
full
- Should the URL returned be full or partial? (Default: partial).boolean loadMap(mixed $mymap)
Fills $this->map with values from an array or file
mymap
- Name of file containing map or map array itselfprivate string runModule(array $addr, [array $nurls])
This method loads a module and returns result from the module's method.
addr
- module "address" from mapnurls
- remaining part of the URL split by '/'
|
Tv2 documentation | |||||
PREV NEXT | FRAMES NO FRAME | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This document was generated by phpdocgen 0.17-rc3.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)