public function FileCacheReader::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/FileCacheReader.php \Doctrine\Common\Annotations\FileCacheReader::__construct()
Constructor.
Parameters
Reader $reader:
string $cacheDir:
boolean $debug:
Throws
\InvalidArgumentException
File
- vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ FileCacheReader.php, line 73
Class
- FileCacheReader
- File cache reader for annotations.
Namespace
Doctrine\Common\AnnotationsCode
public function __construct(Reader $reader, $cacheDir, $debug = false, $umask = 02) {
if (!is_int($umask)) {
throw new \InvalidArgumentException(sprintf('The parameter umask must be an integer, was: %s', gettype($umask)));
}
$this->reader = $reader;
$this->umask = $umask;
if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777 & ~$this->umask, true)) {
throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir));
}
$this->dir = rtrim($cacheDir, '\\/');
$this->debug = $debug;
}