BxCASResponse.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup CASConnect CAS Connect
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxCASResponse extends BxDolAlertsResponse
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. public function __construct()
  16. {
  17. parent::__construct();
  18. $this->_sModule = 'bx_cas';
  19. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  20. }
  21. /**
  22. * Overwtire the method of parent class.
  23. *
  24. * @param BxDolAlerts $oAlert an instance of alert.
  25. */
  26. public function response($oAlert)
  27. {
  28. $sMethod = '_process' . bx_gen_method_name($oAlert->sUnit . '_' . $oAlert->sAction);
  29. if(!method_exists($this, $sMethod))
  30. return;
  31. return $this->$sMethod($oAlert);
  32. }
  33. protected function _processAccountAddForm($oAlert)
  34. {
  35. $sCode = $this->_oModule->serviceAccountAddFormCheck();
  36. if($sCode)
  37. $oAlert->aExtras['form_code'] = $sCode;
  38. }
  39. }
  40. /** @} */