private function replaceTemplatesInDirectory($cacheZipFolderPath, $filetypes, Pap_Common_User $affiliate, Pap_Common_Banner $banner, $channelcode){ $cacheZipFolder = new Gpf_Io_DirectoryIterator($cacheZipFolderPath, '', true); $typesArray = $this->getFileTypesArray($filetypes); foreach ($cacheZipFolder as $fullFileName => $fileName) { $file = new Gpf_Io_File($fullFileName); if ($file->matchPatterns($typesArray)){ $content = $this->replaceVariables($affiliate, $banner, $channelcode, $file->getContents()); $file->putContents($content); } } }