mythinking / doophp

Automatically exported from code.google.com/p/doophp
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

querystring params not passed with catchall enabled #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. enable matchall in route:
$route['*']['catchall']['/:page_id'] = array('FrontController', 'index');

2. request http://domain.com/a/b/c/?d=1&e=2

3. run var_dump($this->params);

What is the expected output? What do you see instead?
i wanna  params to contain all variables. 

What version of the product are you using? On what operating system?
latest svn checkout, r449.

please consider the patch i made to solve the issue, So I could still use your 
system and not starting my own fork

Please provide any additional information below.
The problem is in DooUriRouter.php 

Original issue reported on code.google.com by iphrai...@gmail.com on 17 Jul 2010 at 12:16

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi, I don't understand your problem. What do you need to retrieve that URI 
router lack of currently?

You can already do this with the framework:
http://localhost/a/b/c/d/e/?id=12¶m=xxx

and get this:
//$this->params
Array
(
    [id] => a
    [0] => b
    [1] => c
    [2] => d
    [3] => e
)

//$_GET
Array
(
    [id] => 12
    [somthing] => xxx
)

$route['*']['catchall']['/:id'] = array('TestController', 'myFunction');

Original comment by darkredz on 19 Jul 2010 at 3:37

GoogleCodeExporter commented 9 years ago
The framework won't change the way PHP work, where get variables are retrieve 
with $_GET. 

Original comment by darkredz on 19 Jul 2010 at 3:38