$field = 'articles';
${'action_'.$field};
class Foo {
function __call($func, $params) {
switch($func) {
case 'one':
// logic for one method
break;
}
}
}
$foo = new Foo();
$foo->one(); // runs logic for one method