function FakeAutoloader::register

Registers this instance as an autoloader.

Parameters

bool $prepend: Whether to prepend the autoloader or not

File

core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php, line 180

Class

FakeAutoloader
A fake autoloader for testing.

Namespace

Drupal\Tests\Core\DrupalKernel

Code

public function register($prepend = FALSE) {
  spl_autoload_register([
    $this,
    'loadClass',
  ], TRUE, $prepend);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.