Munin.php 981 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Drupal\munin_api;
  3. /**
  4. * Class Munin contains constants to avoid magic strings in the module code.
  5. */
  6. class Munin {
  7. const MODULE = 'munin_api';
  8. // The meta-probe, monitoring Munin from Drupal.
  9. const PROBE_MUNIN = 'munin_munin';
  10. // The module hooks.
  11. const HOOK_FETCH = self::MODULE . '_fetch';
  12. const HOOK_INFO = self::MODULE . '_info';
  13. // Routes (paths in D7).
  14. const R_BASE = self::MODULE;
  15. const R_CONFIG = 'admin/config/' . self::MODULE;
  16. const R_REPORTS = 'admin/reports/' . self::MODULE;
  17. // Variables (config, settings, state in D7).
  18. const V_INIT_PATH = self::MODULE . '_init_path';
  19. const V_LAST = self::MODULE . '_last';
  20. const V_NEXT_REPORT = self::MODULE . '_next_report';
  21. const V_WATCHDOG = self::MODULE . '_watchdog';
  22. const V_WATCHDOG_CRON = 'cron';
  23. const V_WATCHDOG_NONE = 'none';
  24. const V_WATCHDOG_INIT = 'init';
  25. // Variable defaults.
  26. const D_INIT_PATH = '/^$/';
  27. const D_WATCHDOG = self::V_WATCHDOG_CRON;
  28. }