Changes between Version 8 and Version 9 of Jaws2/Internals/Jaws_URLMapper

Show
Ignore:
Author:
nicobn (IP: 169.254.0.2)
Timestamp:
08/25/07 02:09:54 (11 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Jaws2/Internals/Jaws_URLMapper

    v8 v9  
    5353}}} 
    5454 
    55 This adds a submap to the root map that matches every request that starts with blog and that calls the Blog gadget when encountered. 
     55This adds a submap to the root map that matches every request that starts with blog and that calls the Blog gadget when encountered. The {{{add()}}} method returns the map number of the new map. 
    5656 
    57 == Remove a map == 
     57== Remove a submap == 
     58To remove a submap, the {{{Jaws_URLMapper_Map::remove(integer $num)}}} method is used. ''In exemplis:'', if you want to delete the submap with map number 12: 
    5859 
    59 == Change a map's map number == 
     60{{{ 
     61Jaws::$Maps->getRootMap()->remove(12); 
     62}}} 
     63 
     64== Change a submap's map number == 
     65To remove a submap, the {{{Jaws_URLMapper_Map::move(integer $num, integer $newnum)}}} method is used. If there is a collision with an existing map, the change will fail. ''In exemplis'', if you want to change the map number of the submap with map number 12 to 13: 
     66 
     67{{{ 
     68Jaws::$Maps->getRootMap()->move(12, 13); 
     69}}} 
    6070 
    6171== Change other map settings == 
     72There exist specific methods to change and access map settings: 
     73 * Matching expression: {{{Jaws_URLMapper_Map::setExpression(string $expr)}}} / {{{Jaws_URLMapper_Map::getExpression()}}} 
     74 * Action: {{{Jaws_URLMapper_Map::setAction(string $action)}}} / {{{Jaws_URLMapper_Map::getAction()}}} 
    6275 
    6376== Save the changes == 
     77Everytime a change is made to a map, it should be saved with the {{{Jaws_URLMapper::save()}}} method, usually accessed through: 
     78 
     79{{{ 
     80Jaws::$Maps->save(); 
     81}}}  
    6482 
    6583=== [wiki:Jaws2/Internals/CoreSubsystems < Click here to go back to the Core subsystems section] ===