You are here

public function FileCacheReader::__construct in Plug 7

Constructor.

Parameters

Reader $reader:

string $cacheDir:

boolean $debug:

Throws

\InvalidArgumentException

File

lib/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php, line 68

Class

FileCacheReader
File cache reader for annotations.

Namespace

Doctrine\Common\Annotations

Code

public function __construct(Reader $reader, $cacheDir, $debug = false) {
  $this->reader = $reader;
  if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true)) {
    throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir));
  }
  $this->dir = rtrim($cacheDir, '\\/');
  $this->debug = $debug;
}