protected function setCacheDir($path)
    {
        if (!is_dir($path)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Cache directory at %s could not be found',
                    $path
                )
            );
        }
        if (!is_readable($path)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Cache directory at %s is not readable',
                    $path
                )
            );
        }
        if (!is_writable($path)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Cache directory at %s is not writable',
                    $path
                )
            );
        }

        $this->cacheDir = realpath($path);
    }
protected function setCacheDir($path)
    {
        if (!is_dir($path)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Cache directory at %s could not be found',
                    $path
                )
            );
        }
        if (!is_readable($path)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Cache directory at %s is not readable',
                    $path
                )
            );
        }
        if (!is_writable($path)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Cache directory at %s is not writable',
                    $path
                )
            );
        }

        $this->cacheDir = realpath($path);
    }
protected function setCacheDir ( $ path ) { if ( ! is_dir ( $ path ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Cache directory at %s could not be found' , $ path ) ) ; } if ( ! is_readable ( $ path ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Cache directory at %s is not readable' , $ path ) ) ; } if ( ! is_writable ( $ path ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Cache directory at %s is not writable' , $ path ) ) ; } $ this -> cacheDir = realpath ( $ path ) ; }
Sets the path to the cache directory.

@param string $path Path to cache directory

@return void
@throws \InvalidArgumentException
Sets the path to the cache directory .