Well first of all you should be working with php5 which has visibility keywords and some other things:
class Action {
protected $func;
protected $param;
public function __construct($params = array()){
$url_keys = array_keys($params);
$this->func = $url_keys[0] . "Action"; // so use can not call function without surfix "Action" in this class
$this->param = $params[$this->func];
}
public function callFunction(){
$f = $this->func;
return $f( $this->param );
}
}
You should always pass in $_GET
IMO so your instantiation now looks like this:
$action = new Action($_GET);
$action->callFunction();
Now as far as what youre trying to accomplish here it is unclear. If youre trying to essentially build a routing class i think this is pretty ugly and error prone as is.
In terms of you comment about not wanting to use a framework because the project is simple/small id urge you to check out Silex or Slim micro frameworks instead of building from scratch.
For example with Silex:
$app = new Silex\Application();
$app->get('/object/update/{id}', function($id) use($app) {
// do your update with $id
// then return a response
return 'Update Complete';
// basically you return whatever response you want so normally youd return html.
});
$app->run();