Cheetah
installer.php
Go to the documentation of this file.
1 <?php
2 
8 ch_import('ChWsbInstaller');
9 
11 {
13  {
14  parent::__construct($aConfig);
15  }
16 
17  function install($aParams)
18  {
19  $aResult = parent::install($aParams);
20 
21  if($aResult['result'] && ChWsbRequest::serviceExists('wall', 'update_handlers'))
22  ChWsbService::call('wall', 'update_handlers', array($this->_aConfig['home_uri'], true));
23 
24  if($aResult['result'] && ChWsbRequest::serviceExists('spy', 'update_handlers'))
25  ChWsbService::call('spy', 'update_handlers', array($this->_aConfig['home_uri'], true));
26 
27  if($aResult['result'] && ChWsbRequest::serviceExists('payment', 'update_dependent_modules'))
28  ChWsbService::call('payment', 'update_dependent_modules', array($this->_aConfig['home_uri'], true));
29 
30  if($aResult['result'] && ChWsbRequest::serviceExists('payflow', 'update_dependent_modules'))
31  ChWsbService::call('payflow', 'update_dependent_modules', array($this->_aConfig['home_uri'], true));
32 
33  return $aResult;
34  }
35 
36  function uninstall($aParams)
37  {
38  if(ChWsbRequest::serviceExists('wall', 'update_handlers'))
39  ChWsbService::call('wall', 'update_handlers', array($this->_aConfig['home_uri'], false));
40 
41  if(ChWsbRequest::serviceExists('spy', 'update_handlers'))
42  ChWsbService::call('spy', 'update_handlers', array($this->_aConfig['home_uri'], false));
43 
44  if(ChWsbRequest::serviceExists('payment', 'update_dependent_modules'))
45  ChWsbService::call('payment', 'update_dependent_modules', array($this->_aConfig['home_uri'], false));
46 
47  if(ChWsbRequest::serviceExists('payflow', 'update_dependent_modules'))
48  ChWsbService::call('payflow', 'update_dependent_modules', array($this->_aConfig['home_uri'], false));
49 
50  return parent::uninstall($aParams);
51  }
52 }
ChWsbRequest\serviceExists
static serviceExists($mixedModule, $sMethod, $sClass="Module")
Definition: ChWsbRequest.php:70
ch_import
ch_import($sClassName, $aModule=array())
Definition: utils.inc.php:1218
$aResult
$aResult
Definition: index.php:19
php
ChWsbInstaller
Definition: ChWsbInstaller.php:38
ChStoreInstaller\__construct
__construct($aConfig)
Definition: installer.php:12
ChStoreInstaller\uninstall
uninstall($aParams)
Definition: installer.php:36
ChStoreInstaller
Definition: installer.php:11
$aConfig
$aConfig
Definition: config.php:8
ChWsbService\call
static call($mixed, $sMethod, $aParams=array(), $sClass='Module')
Definition: ChWsbService.php:32
ChStoreInstaller\install
install($aParams)
Definition: installer.php:17