Here is the scenario:
I have a class with no predetermined amount of methods. Some will be function actionName and others will be called function filterName where "filter" and "action" will define what type of method they are and "Name" can be anything.
In my __construct() I want to:
$methods = get_class_methods($this); foreach ( $methods as $method ) { if ( $method == 'action' ) $this->DoSomething( $this->{$method}() ); if ( $method == 'filter' ) $this->DoSomethingElse( $this->{$method}() ); } How can I achieve this without using any type of string or reg expressions?
I am also open to using an alternative to get_class_methods(). But remember I will never know how many "action" or "filter" methods exists.