Welcome Guest, Not a member yet? Register   Sign In
in HMVC + routing ruri_to_assoc returns empty array
#1

[eluser]scibuff[/eluser]
Hi, so I have a very simple setup with HMVC and I added a module - here's the file structure

Code:
application/modules/test/controllers/basic_test_controller.php
application/modules/test/views/basic_test_view.php

and I'm routing the requests to it in the application/config.routes.php like so

Code:
$route['tests(:any)'] = 'tests/basic_test_controller/index';

In the index function I simply do

Code:
print_r( $this->uri->ruri_to_assoc() );
exit();

but all I get is an empty array for all requests, e.g. http://www.example.com/tests/p1/v1/p2/v2

Funnily enough, this code works as expected

Code:
print_r( $this->uri->uri_to_assoc() );
exit();

Output: Array ( [p1] => v1 [p2] => v2 )


Why is that despite that I'm using routing? Can I reply on this? Or should I just do something like

Code:
$parameters = array_merge(
    $this->uri->uri_to_assoc(),
    $this->uri->ruri_to_assoc()
);

Thank you




Theme © iAndrew 2016 - Forum software by © MyBB