BxProfilerModule.php 936 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 Profiler Profiler
  7. * @ingroup DolphinModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxDolModule');
  12. /**
  13. * Profiler module by BoonEx
  14. *
  15. * This module estimate timining, like page openings, mysql queries execution and service calls.
  16. * Also it can log too long queries, so you can later investigate these bottle necks and speedup whole script.
  17. */
  18. class BxProfilerModule extends BxDolModule {
  19. function BxProfilerModule(&$aModule) {
  20. parent::BxDolModule($aModule);
  21. }
  22. function actionHome () {
  23. $this->_oTemplate->pageStart();
  24. echo $this->_aModule['title'];
  25. $this->_oTemplate->pageCode($this->_aModule['title']);
  26. }
  27. function isAdmin () {
  28. return $GLOBALS['logged']['admin'];
  29. }
  30. }
  31. /** @} */