Changeset 7517
- Timestamp:
- 02/16/08 16:11:39 (9 months ago)
- Files:
-
- branches/1.1/lib/routing/sfPatternRouting.class.php (modified) (5 diffs)
- branches/1.1/lib/routing/sfRouting.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/routing/sfPatternRouting.class.php
r7514 r7517 31 31 32 32 /** 33 * Initialize this Routing. 34 * 35 * @param sfEventDispatcher A sfEventDispatcher instance 36 * @param array An associative array of initialization options. 37 * 38 * @return Boolean true, if initialization completes successfully, otherwise false. 39 * 40 * @throws <b>sfInitializationException</b> If an error occurs while initializing this sfRouting. 33 * @see sfRouting 41 34 */ 42 35 public function initialize(sfEventDispatcher $dispatcher, $options = array()) … … 132 125 } 133 126 127 /** 128 * Sets the default suffix 129 * 130 * @param string The default suffix 131 */ 134 132 public function setDefaultSuffix($suffix) 135 133 { … … 221 219 } 222 220 223 /**224 * Adds a new route at the end of the current list of routes.225 *226 * A route string is a string with 2 special constructions:227 * - :string: :string denotes a named paramater (available later as $request->getParameter('string'))228 * - *: * match an indefinite number of parameters in a route229 *230 * Here is a very common rule in a symfony project:231 *232 * <code>233 * $r->connect('/:module/:action/*');234 * </code>235 *236 * @param string The route name237 * @param string The route string238 * @param array The default parameter values239 * @param array The regexps parameters must match240 *241 * @return array current routes242 */221 /** 222 * Adds a new route at the end of the current list of routes. 223 * 224 * A route string is a string with 2 special constructions: 225 * - :string: :string denotes a named paramater (available later as $request->getParameter('string')) 226 * - *: * match an indefinite number of parameters in a route 227 * 228 * Here is a very common rule in a symfony project: 229 * 230 * <code> 231 * $r->connect('/:module/:action/*'); 232 * </code> 233 * 234 * @param string The route name 235 * @param string The route string 236 * @param array The default parameter values 237 * @param array The regexps parameters must match 238 * 239 * @return array current routes 240 */ 243 241 public function connect($name, $route, $default = array(), $requirements = array()) 244 242 { … … 347 345 } 348 346 349 /**350 * Generates a valid URLs for parameters.351 *352 * @param array The parameter values353 * @param string The divider between key/value pairs354 * @param string The equal sign to use between key and value355 *356 * @return string The generated URL357 */347 /** 348 * Generates a valid URLs for parameters. 349 * 350 * @param array The parameter values 351 * @param string The divider between key/value pairs 352 * @param string The equal sign to use between key and value 353 * 354 * @return string The generated URL 355 */ 358 356 public function generate($name, $params, $querydiv = '/', $divider = '/', $equals = '/') 359 357 { … … 478 476 } 479 477 480 /**481 * Parses a URL to find a matching route.482 *483 * Returns null if no route match the URL.484 *485 * @param string URL to be parsed486 *487 * @return array An array of parameters488 */478 /** 479 * Parses a URL to find a matching route. 480 * 481 * Returns null if no route match the URL. 482 * 483 * @param string URL to be parsed 484 * 485 * @return array An array of parameters 486 */ 489 487 public function parse($url) 490 488 { branches/1.1/lib/routing/sfRouting.class.php
r7457 r7517 43 43 * 44 44 * @param sfEventDispatcher A sfEventDispatcher instance 45 * @param array An associative array of initialization options. 46 * 47 * @return Boolean true, if initialization completes successfully, otherwise false. 48 * 49 * @throws <b>sfInitializationException</b> If an error occurs while initializing this sfRouting. 45 * @param array An associative array of initialization options. 50 46 */ 51 47 public function initialize(sfEventDispatcher $dispatcher, $options = array())