function simpletest_classloader_register in Drupal 7
Same name and namespace in other branches
- 8 core/modules/simpletest/simpletest.module \simpletest_classloader_register()
 
4 calls to simpletest_classloader_register()
- simpletest_result_form in modules/
simpletest/ simpletest.pages.inc  - Test results form for $test_id.
 - simpletest_test_form_submit in modules/
simpletest/ simpletest.pages.inc  - Run selected tests.
 - simpletest_test_get_all in modules/
simpletest/ simpletest.module  - Get a list of all of the tests provided by the system.
 - _simpletest_batch_operation in modules/
simpletest/ simpletest.module  - Implements callback_batch_operation().
 
File
- modules/
simpletest/ simpletest.module, line 411  - Provides testing functionality.
 
Code
function simpletest_classloader_register() {
  // Prevent duplicate classloader registration.
  static $first_run = TRUE;
  if (!$first_run) {
    return;
  }
  $first_run = FALSE;
  // Only register PSR-0 class loading if we are on PHP 5.3 or higher.
  if (version_compare(PHP_VERSION, '5.3') > 0) {
    spl_autoload_register('_simpletest_autoload_psr4_psr0');
  }
}