public function routerShutdown(Yaf\Request_Abstract $request, Yaf\Response_Abstract $response) { //RPC INIT START --> if ($request->controller == 'Process' || $request->controller == 'Test') { \Core\Rpc::initialize(); } //RPC INIT END <-- }
public function clientAction() { $service = [[['V0001'], ['order1'], ['order', 'targetnum', '18618610010']]]; //{{{"V0001"},{"order1"},{"","",""}},{{"V0016"},{"order2"},{"order3","targetnum","18618610010"}}} //var_dump($service); \Core\Rpc::add_client(RPC_TEST_PHPRPC_URI, NULL, 'PHPRpc'); //$_result = \Core\Rpc::call()->RegisterAccount('17090440005','FFFFFFFFFFFFFFFFFFF', 'FFFFFFFFFFFFFFFFFFFF', 'postpaid', $service, '史景烨', '北京', '010', '130xxxxxxxxxx'); $_result = \Core\Rpc::call()->getServiceByUser('5'); var_dump($_result); return FALSE; }
/** * Function process * @param $_api * @param array $_parameters * @return bool */ public static function process($_api, $_parameters = []) { return \Core\Rpc::call()->{$_api}['proc_method']($_parameters, $_api); }