PHP: Get instance of static class by string value?

You can use call_user_func to capture the instance, then process it as needed: $instance = call_user_func(array($confObject, 'inst')); if($instance->checkMethod($method)) {.

You can use call_user_func to capture the instance, then process it as needed: $instance = call_user_func(array($confObject, 'inst')); if($instance->checkMethod($method)) { ...

Thanks, that did it! – Tirithen Mar 24 '10 at 12:59.

Stackoverflow. Com/questions/2482861/… – Tatu Ulmanen Mar 22 '10 at 11:37.

This gives the error "Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in ....." since $confObject is a string and not a object. But can't get it to work with $$ either, is there some other way around this? I don't want to rewrite more than necessary.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions