Ejemplo n.º 1
0
 public static function call($mixed, $sMethod, $aParams = array(), $sClass = 'Module')
 {
     $oDb = new BxDolModuleDb();
     if (is_string($mixed)) {
         $aModule = $oDb->getModuleByUri($mixed);
     } else {
         $aModule = $oDb->getModuleById($mixed);
     }
     return empty($aModule) ? '' : BxDolRequest::processAsService($aModule, $sMethod, $aParams, $sClass);
 }
Ejemplo n.º 2
0
 /**
  * Perform serice call
  * @param $mixed module name or module id
  * @param $sMethod service method name in format 'method_name', corresponding class metod is serviceMethodName
  * @param $aParams params to pass to service method
  * @param $sClass class to search for service method, by default it is main module class
  * @return service call result
  */
 public static function call($mixed, $sMethod, $aParams = array(), $sClass = 'Module')
 {
     bx_import('BxDolModuleQuery');
     $oDb = BxDolModuleQuery::getInstance();
     $aModule = array();
     if (is_string($mixed)) {
         $aModule = $oDb->getModuleByName($mixed);
     } else {
         $aModule = $oDb->getModuleById($mixed);
     }
     return empty($aModule) ? '' : BxDolRequest::processAsService($aModule, $sMethod, $aParams, $sClass);
 }