[eluser]Vheissu[/eluser]
I'm slightly confused. I did take a look at the caching drivers and how they worked, I'll try an example.
Say I have a standard auth driver called 'simpleauth' which has the following functions:
login
logout
add_user
edit_user
delete_user
create_hash
hash_password
Now say I have an auth driver called 'facebook' for Facebook type authentication. Obviously it's going to share some things in common with the other drivers for logging in, but there are other things not needed like a add_user function, edit_user function or delete_user function.
What is the best way to go about this? I noticed that the caching drivers have the functions defined in the parent class; get, save, clear, etc and then they are calling a function within the default driver. So the child classes each have a get, save, clear function too that is called.
Now with caching it seems a little more clear as caching has a set of functions each driver should do, so it's standardised, however something like an auth library can have all kinds of different functions and whatnot in each driver.
At present I am using a __call in the parent class which uses call_user_func_arr which is extremely slow, even reflection classes are slow. Am I overcomplicating this? What is a good workaround/suggestion for what I am wanting to accomplish?