Cheetah
ChWsbService.php
Go to the documentation of this file.
1 <?php
2 
8 require_once(CH_DIRECTORY_PATH_CLASSES . 'ChWsbRequest.php');
9 require_once(CH_DIRECTORY_PATH_CLASSES . 'ChWsbModuleDb.php');
10 
31 {
32  public static function call($mixed, $sMethod, $aParams = array(), $sClass = 'Module')
33  {
34  $oDb = new ChWsbModuleDb();
35 
36  if(is_string($mixed))
37  $aModule = $oDb->getModuleByUri($mixed);
38  else
39  $aModule = $oDb->getModuleById($mixed);
40 
41  return empty($aModule) ? '' : ChWsbRequest::processAsService($aModule, $sMethod, $aParams, $sClass);
42  }
43 
44  public static function callArray($a)
45  {
46  if (!isset($a['module']) || !isset($a['method']))
47  return false;
48 
49  return self::call($a['module'], $a['method'], isset($a['params']) ? $a['params'] : array(), isset($a['class']) ? $a['class'] : 'Module');
50  }
51 
52 }
ChWsbRequest\processAsService
static processAsService($aModule, $sMethod, $aParams, $sClass="Module")
Definition: ChWsbRequest.php:53
$aModule
$aModule
Definition: classifieds.php:21
php
ChWsbModuleDb
Definition: ChWsbModuleDb.php:12
ChWsbService\callArray
static callArray($a)
Definition: ChWsbService.php:44
$oDb
global $oDb
Definition: db.inc.php:39
ChWsbService
Definition: ChWsbService.php:31
empty
Attr AllowedRel this is empty
Definition: Attr.AllowedRel.txt:7
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32