boot_test_1.module 550 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * @file
  4. * Tests calling module_implements() during hook_boot() invocation.
  5. */
  6. /**
  7. * Implements hook_boot().
  8. */
  9. function boot_test_1_boot() {
  10. // Calling module_implements during hook_boot() will return "vital" modules
  11. // only, and this list of modules will be statically cached.
  12. module_implements('help');
  13. // Define a special path to test that the static cache isn't written away
  14. // if we exit before having completed the bootstrap.
  15. if ($_GET['q'] == 'early_exit') {
  16. module_implements_write_cache();
  17. exit();
  18. }
  19. }