public function setCacheDirectory($directory)
    {
        if (!is_dir($directory)) {
            $this->createDirectory($directory);
        }

        if (!is_writable($directory)) {
            throw new \InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir));
        }

        $this->cacheDirectory = $directory;

        return $this;
    }
public function setCacheDirectory($directory)
    {
        if (!is_dir($directory)) {
            $this->createDirectory($directory);
        }

        if (!is_writable($directory)) {
            throw new \InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir));
        }

        $this->cacheDirectory = $directory;

        return $this;
    }
public function setCacheDirectory ( $ directory ) { if ( ! is_dir ( $ directory ) ) { $ this -> createDirectory ( $ directory ) ; } if ( ! is_writable ( $ directory ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The cache directory "%s" is not writable.' , $ dir ) ) ; } $ this -> cacheDirectory = $ directory ; return $ this ; }
Set cache directory

@param string $directory
@return OpenGraphGeneratorBuilder
Set cache directory