Fatal Error when calling static method of a custom class |
[eluser]drkameleon[/eluser]
So, here's my situation : - I'm using CodeIgniter - I've set up a helper, ('string_helper' under 'DK' folder) - I've set up the dkString class in dk/string_helper.php Code: static function strInArray($str,$arr) In my controller: - I'm loading the helper ($this->load->helper('dk/string') - Calling the method (dkString:trInArray($str,$arr) Note : - I've loaded class's static methods residing in a custom helper, like 100 times. So there's nothing wrong with it. - It doesn't matter whether the function is declared as static or not. Normally it works, no matter what. However, I keep getting the following error : Quote:Fatal error: Call to undefined method dkString:trInArray() in /the/path/to/the/caller/file.php on Line XX In my controller, after loading the helper ($this->load->helper('dk/string'), I tried : Code: if (class_exists('dkString')) { echo "IT EXISTS<br/>Methods : "; print_r(get_class_methods('dkString')); } The "funny" thing is that the output was : Quote:IT EXISTS In a few words : the class IS loaded, and it "sees" ALL methods (except for the last one). I also tried adding new function to existing classes, and it suddenly DOESN'T SEE THEM. Could it have anything to do with any type of "caching"???? (I don't know...) Any ideas? (for a full view of the code have a look at here : http://stackoverflow.com/questions/11815...tic-method)
|
Welcome Guest, Not a member yet? Register Sign In |