You are here

public function DebugClassLoader::__construct in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/debug/DebugClassLoader.php \Symfony\Component\Debug\DebugClassLoader::__construct()
  2. 8 vendor/symfony/class-loader/DebugClassLoader.php \Symfony\Component\ClassLoader\DebugClassLoader::__construct()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/debug/DebugClassLoader.php \Symfony\Component\Debug\DebugClassLoader::__construct()

Constructor.

Parameters

callable|object $classLoader Passing an object is @deprecated since version 2.5 and support for it will be removed in 3.0:

File

vendor/symfony/debug/DebugClassLoader.php, line 40

Class

DebugClassLoader
Autoloader checking if the class is really defined in the file found.

Namespace

Symfony\Component\Debug

Code

public function __construct($classLoader) {
  $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile');
  if ($this->wasFinder) {
    @trigger_error('The ' . __METHOD__ . ' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED);
    $this->classLoader = array(
      $classLoader,
      'loadClass',
    );
    $this->isFinder = true;
  }
  else {
    $this->classLoader = $classLoader;
    $this->isFinder = is_array($classLoader) && method_exists($classLoader[0], 'findFile');
  }
  if (!isset(self::$caseCheck)) {
    self::$caseCheck = false !== stripos(PHP_OS, 'win') ? false !== stripos(PHP_OS, 'darwin') ? 2 : 1 : 0;
  }
}