You are here

public function WinCacheClassLoader::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/class-loader/WinCacheClassLoader.php \Symfony\Component\ClassLoader\WinCacheClassLoader::__construct()

Constructor.

Parameters

string $prefix The WinCache namespace prefix to use.:

object $decorated A class loader object that implements the findFile() method.:

Throws

\RuntimeException

\InvalidArgumentException

File

vendor/symfony/class-loader/WinCacheClassLoader.php, line 69

Class

WinCacheClassLoader
WinCacheClassLoader implements a wrapping autoloader cached in WinCache.

Namespace

Symfony\Component\ClassLoader

Code

public function __construct($prefix, $decorated) {
  if (!extension_loaded('wincache')) {
    throw new \RuntimeException('Unable to use WinCacheClassLoader as WinCache is not enabled.');
  }
  if (!method_exists($decorated, 'findFile')) {
    throw new \InvalidArgumentException('The class finder must implement a "findFile" method.');
  }
  $this->prefix = $prefix;
  $this->decorated = $decorated;
}