FUEL CMS User Guide : Version 0.9.3


MY_URI Class

The MY_URI Class extends CI_URI result class. It adds a couple methods listed below:

$this->uri->assoc_to_uri('array', [noemptys])

Overwrites existing CI method that generates a URI string from an associative array but with the added noemptys parameter. This will not add empty array values to the URI string

$uri = array('id' => 1, 'param1' => '', 'param2' => 'value2');
$this->uri->assoc_to_uri($uri, TRUE);
echo $uri; // id/1/param2/value2

$this->uri->init_get_params()

Sets the $_GET parameters.

...
// a page with a query string of ?id=1234
...
$this->uri->init_get_params();
echo $this->input->get('id'); // 1234