protected function _addDir($pfm, $role, $roleDir, $path, $include, $ignore) { $roleDirLen = strlen($roleDir); $entries = $this->_filesystem->getNestedKeys($roleDir . $path . DS); if (!empty($entries)) { foreach ($entries as $entry) { $filePath = substr($entry, $roleDirLen); if (!empty($include) && !preg_match($include, $filePath)) { continue; } if (!empty($ignore) && preg_match($ignore, $filePath)) { continue; } if ($this->_filesystem->isFile($entry)) { $pfm->addFile('/', $filePath, array('role' => $role, 'md5sum' => $this->_filesystem->getFileMd5($entry))); } } } }