Codeigniter User Guide, Controllers: default_method()? |
[eluser]Unknown[/eluser]
Hello Codeigniter experts! I'd be grateful to clarification of something on the controllers page of the user guide: http://ellislab.com/codeigniter/user-gui...llers.html The section "Remapping function calls" contains the following snippet: Code: public function _remap($method) I tried to implement it like this: Code: public function _remap($method='comments') Needless to say, I received an error: Call to undefined method Blog::default_method(). What should I do differently? Thanks in advance!
[eluser]InsiteFX[/eluser]
The CI_Controller default method is the index method everything will pass through the index method. _remap will proccess any parameters that are passed through the index method. Code: public function index($prams) $prams would be passed to the _remap method. This is usefull for like a users profile. http://www.your.com/username |
Welcome Guest, Not a member yet? Register Sign In |