You are here

public function ApcClassLoader::__construct in Zircon Profile 8.0

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

Constructor.

Parameters

string $prefix The APC namespace prefix to use.:

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

Throws

\RuntimeException

\InvalidArgumentException

File

vendor/symfony/class-loader/ApcClassLoader.php, line 68

Class

ApcClassLoader
ApcClassLoader implements a wrapping autoloader cached in APC for PHP 5.3.

Namespace

Symfony\Component\ClassLoader

Code

public function __construct($prefix, $decorated) {
  if (!extension_loaded('apc')) {
    throw new \RuntimeException('Unable to use ApcClassLoader as APC 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;
}