Can I somehow do this in an abstract class in php:
abstract function AddFilter();
abstract function AddFilter( /*array*/ $c_array='', /*string*/ $url='')
// ... etc...
using optional parameters / how do I do this?
if i just use the second one i get ‘Declaration ofContent::AddFilter() must be compatible with that of ContentGeneric::AddFilter() ‘
update: ok… my method is now to add a single line callback function in the extended AddFilter() which works but is ofcourse not the nicest, whatever.
No, you can’t do that. PHP does not support overloading functions with different signatures like e.g. C++ does. If you want to emulate something like this, take a look at the __call() magic method.