Re: [PHP] calling static methods of variable class names

2005-11-22 Thread Jochem Maas
Ahmed Saad wrote: hi all, how can i call static methods of a class whose name is variable.. something like I can do this with reflection by creating a ReflectionMethod object then invoke()ing it, but is there a better way? try call_user_func() and/or call_user_func_array() e.g. call_user_fu

Re: [PHP] calling static methods of variable class names

2005-11-22 Thread David Grant
Ahmed, call_user_func(array($className, 'doSomething')); Cheers, David Grant Ahmed Saad wrote: > hi all, > > how can i call static methods of a class whose name is variable.. something > like > > I can do this with reflection by creating a ReflectionMethod object > then invoke()ing it, but i

[PHP] calling static methods of variable class names

2005-11-22 Thread Ahmed Saad
hi all, how can i call static methods of a class whose name is variable.. something like I can do this with reflection by creating a ReflectionMethod object then invoke()ing it, but is there a better way? Thanks -ahmed