game2006api/webapp/controller/CallbackController.class.php
2023-06-19 17:17:34 +08:00

27 lines
648 B
PHP

<?php
class CallbackController extends BaseController {
private $handlers = array(
'gameItemMallBuyOk' => 'gameItemMallBuyOk',
);
public function dispatch()
{
$action = getReqVal('action', '');
if (key_exists($action, $this->handlers)) {
$this->internalDispatch($this->handlers[$action]);
} else {
$this->_rspErr(500, 'not found');
}
}
private function internalDispatch($className)
{
require_once ('services/callback/' . $className . '.php');
$obj = eval("return new services\\" . $className . "();");
$obj->process();
}
}