BxDolInstallController.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinInstall Dolphin Install
  7. * @{
  8. */
  9. class BxDolInstallController
  10. {
  11. protected $_oView;
  12. function __construct()
  13. {
  14. $this->_oView = new BxDolInstallView();
  15. }
  16. function run ($sAction = '')
  17. {
  18. $sMethod = 'action' . ucfirst($sAction);
  19. if ($sAction && method_exists($this, $sMethod))
  20. $this->$sMethod ();
  21. else
  22. $this->actionInitial ();
  23. }
  24. function actionAudit ()
  25. {
  26. $this->_oView->pageStart();
  27. $oAudit = new BxDolStudioToolsAudit();
  28. $sAuditOutput = $oAudit->generate();
  29. $this->_oView->out('audit.php', compact('sAuditOutput'));
  30. $this->_oView->pageEnd('Dolphin 8.0.0 Installation');
  31. }
  32. function actionInitial ()
  33. {
  34. $this->_oView->pageStart();
  35. $oAudit = new BxDolStudioToolsAudit();
  36. $aErrors = $oAudit->checkRequirements(BX_DOL_AUDIT_FAIL);
  37. $aWarnings = $oAudit->checkRequirements(BX_DOL_AUDIT_WARN);
  38. $oAudit->generateStyles();
  39. if (empty($aErrors))
  40. $this->_oView->out('initial.php', compact('aWarnings'));
  41. else
  42. $this->_oView->out('initial_fail.php', compact('aErrors'));
  43. $this->_oView->pageEnd('Dolphin 8.0.0 Installation');
  44. }
  45. }
  46. /** @} */