Passing a library class to call_user_func_array() |
[eluser]Gorelog[/eluser]
Hello, I'm trying to do something like this from a library X and get a function from another library Z. Code: $class_name = foo; I'm not sure how to pass the library ($class_name) over. Any suggestions. Much appreciated.
[eluser]Aken[/eluser]
This seems unnecessary with a CodeIgniter application. What's the result you're trying to achieve?
[eluser]Gorelog[/eluser]
Aken, I found an old library that I'm trying to use, http://code.google.com/p/ci-usertracking/. In the config I can pass the library and function for it to get the user identity. Code: $config['usertracking']['user_identifier'] = array($classType, //required -- enter "model", "helper", or "library" Here is where it errors out in the library Code: if ( ! $this->CI->load->$class_type($class_name)) CodeIgniter gets $this->CI->$class_name as View producing the following error: Message: Undefined property: Views::$Ion_auth I think it would work if I could just pass the library. I have a workaround for this, but I thought it would be nice to get this working as intended. Thanks
[eluser]InsiteFX[/eluser]
This is used for like calling a callback in the current running class. Code: return call_user_func_array(array($this, $callback_function_name), $the_args); CodeIgniter uses this for its _remap method. |
Welcome Guest, Not a member yet? Register Sign In |