27 lines
648 B
PHP
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();
|
|
}
|
|
|
|
}
|