Doctrine\Common\Annotations\FileCacheReader::__construct PHP Method

__construct() public method

Constructor.
public __construct ( Doctrine\Common\Annotations\Reader $reader, string $cacheDir, boolean $debug = false, $umask = 2 )
$reader Doctrine\Common\Annotations\Reader
$cacheDir string
$debug boolean
    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;
    }