Welcome Guest, Not a member yet? Register   Sign In
Can be method used as id?
#6

[eluser]Phil Sturgeon[/eluser]
Remap has a few flaws, you have to manually input any URL segments to the controller.

For example:

Code:
<?php
  class Text extends Controller {
    function _remap($method) {
      if ($method == 'programming') {
        $this->index();
      }
    }

    function index($param) {
      echo $param;
    }
  }
?>

Wont work, $param will show as blank. Use routes for this sort of thing if you need variables from the URL.


Messages In This Thread
Can be method used as id? - by El Forum - 07-31-2007, 10:05 AM
Can be method used as id? - by El Forum - 07-31-2007, 10:14 AM
Can be method used as id? - by El Forum - 07-31-2007, 10:27 AM
Can be method used as id? - by El Forum - 07-31-2007, 10:35 AM
Can be method used as id? - by El Forum - 07-31-2007, 10:41 AM
Can be method used as id? - by El Forum - 07-31-2007, 03:49 PM
Can be method used as id? - by El Forum - 07-31-2007, 04:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB