summaryrefslogtreecommitdiff
path: root/framework/Web/Services
diff options
context:
space:
mode:
authorrojaro <>2010-03-29 08:56:17 +0000
committerrojaro <>2010-03-29 08:56:17 +0000
commitd3c7d23f0d446144132cce6ac2a5a8a853cf0700 (patch)
treee1a521883a2ba711c2dcae60c53ad960bb91300f /framework/Web/Services
parent7cdd0fea2ae055fd026e4f9925781b72be9120dd (diff)
fixed another bug in the rpc service
Diffstat (limited to 'framework/Web/Services')
-rw-r--r--framework/Web/Services/TRpcService.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/framework/Web/Services/TRpcService.php b/framework/Web/Services/TRpcService.php
index 8cc0987c..7310725a 100644
--- a/framework/Web/Services/TRpcService.php
+++ b/framework/Web/Services/TRpcService.php
@@ -63,14 +63,20 @@ class TRpcService extends TService
prado::using($_providerClass);
- $_className = ($_pos = strrpos($_providerClass, '.')) !== false ? substr($_providerClass, $_pos + 1) : $_providerClass;
- if(!is_subclass_of($_className, self::BASE_API_PROVIDER))
+ $_providerClassName = ($_pos = strrpos($_providerClass, '.')) !== false ? substr($_providerClass, $_pos + 1) : $_providerClass;
+ if(!is_subclass_of($_providerClassName, self::BASE_API_PROVIDER))
throw new TConfigurationException('rpcservice_apiprovider_invalid');
if(($_rpcServerClass = $_properties->remove('server')) === null)
$_rpcServerClass = self::BASE_RPC_SERVER;
- $_apiProvider = new $_className(new $_rpcServerClass($protocolHandler));
+ prado::using($_rpcServerClass);
+
+ $_rpcServerClassName = ($_pos = strrpos($_rpcServerClass, '.')) !== false ? substr($_rpcServerClass, $_pos + 1) : $_rpcServerClass;
+ if(!is_subclass_of($_rpcServerClassName, self::BASE_RPC_SERVER))
+ throw new TConfigurationException('rpcservice_rpcserver_invalid');
+
+ $_apiProvider = new $_providerClassName(new $_rpcServerClassName($protocolHandler));
$_apiProvider->setId($providerId);
foreach($_properties as $_key => $_value)