Welcome Guest, Not a member yet? Register   Sign In
How to get the current controller name in an autoloaded model?
#1

[eluser]Unknown[/eluser]
Hello,

How can I get the current controller name in an autoloaded model?

Thanks.
#2

[eluser]pistolPete[/eluser]
You could either use the uri functions: http://ellislab.com/codeigniter/user-gui...s/uri.html
Code:
// if you use no routing:
$this->uri->segment(1);
// otherwise
$this->uri->rsegment(1);

Alternatively you can use this property:
Code:
$this->router->class




Theme © iAndrew 2016 - Forum software by © MyBB