Refactor PHP.
This commit is contained in:
parent
903b29c4c0
commit
b4a1bb1218
@ -19,7 +19,7 @@ class Api {
|
|||||||
$action = use_request_param("action");
|
$action = use_request_param("action");
|
||||||
json_fail(100, "unsupported request", !in_array($action, $this->actions));
|
json_fail(100, "unsupported request", !in_array($action, $this->actions));
|
||||||
|
|
||||||
$methodname = "on_$action";
|
$methodname = "on_${action}";
|
||||||
$this->$methodname();
|
$this->$methodname();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user