Bug Report #4646

Documentation out of date

Added by Ivan Kerin over 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:11/02/2012
Priority:LowDue date:
Assignee:Lorenzo Pisani% Done:

100%

Category:Core
Target version:3.3.1
Resolution:duplicate Points:1

Description

In the routes class the docs are out of date - they speak of passing a URL but the method expects Request object

/**
 * Tests if the route matches a given URI. A successful match will return
 * all of the routed parameters as an array. A failed match will return
 * boolean FALSE.
 *
 *     // Params: controller = users, action = edit, id = 10
 *     $params = $route->matches('users/edit/10');
 *
 * This method should almost always be used within an if/else block:
 *
 *     if ($params = $route->matches($uri))
 *     {
 *         // Parse the parameters
 *     }
 *
 * @param   string  $uri    URI to match
 * @return  array   on success
 * @return  FALSE   on failure
*/
public function matches(Request $request) {
// Get the URI from the Request
$uri = trim($request->uri(), '/');

History

#1 Updated by Robert-Jan Dreu -rjd22- about 1 year ago

Seems that this is already fixed in the 3.3/develop

#2 Updated by Lorenzo Pisani about 1 year ago

  • Status changed from New to Closed
  • Assignee set to Lorenzo Pisani
  • % Done changed from 0 to 100
  • Resolution set to duplicate

I think you're right, reopen if we missed anything!

Also available in: Atom PDF