You are here

public function ApcUniversalClassLoader::__construct in Zircon Profile 8.0

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

Constructor.

Parameters

string $prefix A prefix to create a namespace in APC:

Throws

\RuntimeException

File

vendor/symfony/class-loader/ApcUniversalClassLoader.php, line 77

Class

ApcUniversalClassLoader
ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3.

Namespace

Symfony\Component\ClassLoader

Code

public function __construct($prefix) {
  if (!extension_loaded('apc')) {
    throw new \RuntimeException('Unable to use ApcUniversalClassLoader as APC is not enabled.');
  }
  $this->prefix = $prefix;
}