[eluser]zdknudsen[/eluser]
I found a solution, but I don't like it. Is this really the easiest way?
Code:
class Some_library
{
function Some_library()
{
$ci = &get;_instance();
$eval = '
class Placeholder extends ' . get_class($ci->load) . ' {
function some_method()
{
$args = func_get_args();
call_user_func_array(array("Some_library", "load"), $args);
}
}';
eval($eval);
$ci->load = new Placeholder();
}
function load($argument1)
{
echo $argument1;
}
}
If someone could show me a cleaner way of doing this I'd be delighted.