public function zipDirectory($dirName, $outputDir)
    {
        if (!is_dir($dirName)) {
            trigger_error("CreateZipFile FATAL ERROR: Could not locate the specified directory $dirName", E_USER_ERROR);
        }
        $tmp = $this->parseDirectory($dirName);
        $count = count($tmp);
        $this->addDirectory($outputDir);
        for ($i = 0; $i < $count; $i++) {
            $fileToZip = trim($tmp[$i]);
            $newOutputDir = substr($fileToZip, 0, (strrpos($fileToZip, '/') + 1));
            $outputDir = $outputDir.$newOutputDir;
            $fileContents = file_get_contents($fileToZip);
            $this->addFile($fileContents, $fileToZip);
        }
    }