diff --git a/docroot/include/core/ZirrorAPI.php b/docroot/include/core/ZirrorAPI.php index 56d66ba..673a178 100644 --- a/docroot/include/core/ZirrorAPI.php +++ b/docroot/include/core/ZirrorAPI.php @@ -7,6 +7,11 @@ function process(ZirrorAPI_Request $request) { $this->request = $request; + + $module = $request->getModule (); + + $qualifiedModuleName = $request->getModule ( false ); + return (true); } diff --git a/docroot/include/http/Request.php b/docroot/include/http/Request.php index 36dc6aa..f709ed2 100644 --- a/docroot/include/http/Request.php +++ b/docroot/include/http/Request.php @@ -32,5 +32,18 @@ } + function getModule($raw = true) { + + $moduleName = $this->get ( 'module' ); + if (! $raw) { + $parentModule = $this->get ( 'parent' ); + if (! empty ( $parentModule )) { + $moduleName = $parentModule . ':' . $moduleName; + } + } + return $moduleName; + + } + } ?> \ No newline at end of file diff --git a/docroot/index.php b/docroot/index.php index 245a641..da388c1 100755 --- a/docroot/index.php +++ b/docroot/index.php @@ -9,7 +9,7 @@ $ZirrorAPI = new ZirrorAPI (); $ZirrorAPI->process ( new ZirrorAPI_Request () ); -if (! isset ( $pData->module )) { +if (! isset $ZirrorAPI->module )) { $rData = array (); $rData ['result'] = 'EXCEPTION'; $rData ['resultCode'] = - 1;