Base for a static organization website

TimerPanel.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  10. * @link http://cakephp.org CakePHP(tm) Project
  11. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  12. */
  13. App::uses('DebugPanel', 'DebugKit.Lib');
  14. /**
  15. * Provides debug information on all timers used in a request.
  16. *
  17. */
  18. class TimerPanel extends DebugPanel {
  19. /**
  20. * startup - add in necessary helpers
  21. *
  22. * @param Controller $controller
  23. * @return void
  24. */
  25. public function startup(Controller $controller) {
  26. if (!in_array('Number', array_keys(HelperCollection::normalizeObjectArray($controller->helpers)))) {
  27. $controller->helpers[] = 'Number';
  28. }
  29. if (!in_array('SimpleGraph', array_keys(HelperCollection::normalizeObjectArray($controller->helpers)))) {
  30. $controller->helpers[] = 'DebugKit.SimpleGraph';
  31. }
  32. }
  33. }