This commit is contained in:
aozhiwei 2024-04-22 14:32:03 +08:00
parent 609fdf8230
commit 54de3d78b5
2 changed files with 23 additions and 0 deletions

View File

@ -8,6 +8,7 @@ class BaseController {
private $marketDbConn = null; private $marketDbConn = null;
private $relationDbConn = null; private $relationDbConn = null;
private $timeOffset = 0; private $timeOffset = 0;
private $serviceHash = array();
function __construct() function __construct()
{ {
@ -235,4 +236,15 @@ class BaseController {
return $channel == "0000"; return $channel == "0000";
} }
public function callService($serviceName, $funcName)
{
if (!array_key_exists($serviceName, $this->serviceHash)) {
require_once('services/' . $serviceName . '.php');
$this->serviceHash[$serviceName] = $this->_getNowTime();
}
$method = new ReflectionMethod($serviceName . 'Service', $funcName);
$ret = $method->invoke(null);
return $ret;
}
} }

View File

@ -0,0 +1,11 @@
<?php
namespace services;
class MsgQueueService extends BaseService {
public static function postMsg() {
}
}