function exists |
[eluser]dbashyal[/eluser]
how can i check if function exists in CI i did Code: if(function_exists($this->direction)) also, Code: if(function_exists('direction')) none of them worked on the previous one it says undefined property direction second one returns false i searched the forum couldn't find the solution. i am not that much into classes, so get hard time, sometimes
[eluser]mironcho[/eluser]
For checking if a particular method exists in some object, try to use method_exists() function: http://php.net/method_exists
[eluser]Huan[/eluser]
Yes, you could try if (method_exists($this->somename, some_function))
[eluser]dbashyal[/eluser]
Thanks it worked Code: function _remap($method) may not be the best method that i am trying to do, but it still works. |
Welcome Guest, Not a member yet? Register Sign In |