protected function _copyAndParseDir($sFrom, $sTo, array $aNameMap = array())
    {
        $oFileInfos = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($sFrom, \RecursiveDirectoryIterator::SKIP_DOTS)
        );

        if (!file_exists($sTo)) {
            mkdir($sTo);
        }

        foreach ($oFileInfos as $oFileInfo) {
            $sFilePath = (string)$oFileInfo;
            $aReplace = array(
                'search' => array_merge(array($sFrom), array_keys($aNameMap)),
                'replace' => array_merge(array($sTo), array_values($aNameMap))
            );
            $sNewPath = str_replace($aReplace['search'], $aReplace['replace'], $sFilePath);
            $this->_copyAndParseFile($sFilePath, $sNewPath);
        }
    }