public function setAssetDir($assetDir)
    {
        $emptyAssetDir = empty($assetDir);
        $folderNotExists = ! file_exists($this->docRoot . DS . $assetDir);
        $folderNotDir = ! is_dir($this->docRoot . DS . $assetDir);

        if ($emptyAssetDir || $folderNotExists || $folderNotDir) {
            throw new \InvalidArgumentException(
                'The asset directory set is not a valid directory.'
            );
        }

        if (! is_writable($this->docRoot . DS . $assetDir)) {
            throw new \LogicException(
                'The folder "' . $this->docRoot . DS . $assetDir . '" must be writable.'
            );
        }
        $this->assetDir = $assetDir;
    }